mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-17 07:43:42 -05:00
Temporarily disable vim-powerline (#1)
This commit is contained in:
@@ -126,18 +126,27 @@ function! s:goyo_on(width)
|
||||
\ 'statusline': &statusline
|
||||
\ }
|
||||
|
||||
" gitgutter
|
||||
" vim-gitgutter
|
||||
let t:goyo_disabled_gitgutter = get(g:, 'gitgutter_enabled', 0)
|
||||
if t:goyo_disabled_gitgutter
|
||||
GitGutterDisable
|
||||
endif
|
||||
|
||||
" airline
|
||||
" vim-airline
|
||||
let t:goyo_disabled_airline = exists("#airline")
|
||||
if t:goyo_disabled_airline
|
||||
AirlineToggle
|
||||
endif
|
||||
|
||||
" vim-powerline
|
||||
let t:goyo_disabled_powerline = exists("#PowerlineMain")
|
||||
if t:goyo_disabled_powerline
|
||||
augroup PowerlineMain
|
||||
autocmd!
|
||||
augroup END
|
||||
augroup! PowerlineMain
|
||||
endif
|
||||
|
||||
if !get(g:, 'goyo_linenr', 0)
|
||||
set nonu nornu
|
||||
endif
|
||||
@@ -187,6 +196,7 @@ function! s:goyo_off()
|
||||
let goyo_revert = t:goyo_revert
|
||||
let goyo_disabled_gitgutter = t:goyo_disabled_gitgutter
|
||||
let goyo_disabled_airline = t:goyo_disabled_airline
|
||||
let goyo_disabled_powerline = t:goyo_disabled_powerline
|
||||
|
||||
if tabpagenr() == 1
|
||||
tabnew
|
||||
@@ -204,8 +214,14 @@ function! s:goyo_off()
|
||||
GitGutterEnable
|
||||
endif
|
||||
|
||||
if goyo_disabled_airline
|
||||
if goyo_disabled_airline && !exists("#airline")
|
||||
AirlineToggle
|
||||
AirlineRefresh
|
||||
endif
|
||||
|
||||
if goyo_disabled_powerline && !exists("#PowerlineMain")
|
||||
doautocmd PowerlineStartup VimEnter
|
||||
silent! PowerlineReloadColorscheme
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user