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
|
\ 'statusline': &statusline
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" gitgutter
|
" vim-gitgutter
|
||||||
let t:goyo_disabled_gitgutter = get(g:, 'gitgutter_enabled', 0)
|
let t:goyo_disabled_gitgutter = get(g:, 'gitgutter_enabled', 0)
|
||||||
if t:goyo_disabled_gitgutter
|
if t:goyo_disabled_gitgutter
|
||||||
GitGutterDisable
|
GitGutterDisable
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" airline
|
" vim-airline
|
||||||
let t:goyo_disabled_airline = exists("#airline")
|
let t:goyo_disabled_airline = exists("#airline")
|
||||||
if t:goyo_disabled_airline
|
if t:goyo_disabled_airline
|
||||||
AirlineToggle
|
AirlineToggle
|
||||||
endif
|
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)
|
if !get(g:, 'goyo_linenr', 0)
|
||||||
set nonu nornu
|
set nonu nornu
|
||||||
endif
|
endif
|
||||||
@@ -184,9 +193,10 @@ function! s:goyo_off()
|
|||||||
augroup END
|
augroup END
|
||||||
augroup! goyop
|
augroup! goyop
|
||||||
|
|
||||||
let goyo_revert = t:goyo_revert
|
let goyo_revert = t:goyo_revert
|
||||||
let goyo_disabled_gitgutter = t:goyo_disabled_gitgutter
|
let goyo_disabled_gitgutter = t:goyo_disabled_gitgutter
|
||||||
let goyo_disabled_airline = t:goyo_disabled_airline
|
let goyo_disabled_airline = t:goyo_disabled_airline
|
||||||
|
let goyo_disabled_powerline = t:goyo_disabled_powerline
|
||||||
|
|
||||||
if tabpagenr() == 1
|
if tabpagenr() == 1
|
||||||
tabnew
|
tabnew
|
||||||
@@ -204,8 +214,14 @@ function! s:goyo_off()
|
|||||||
GitGutterEnable
|
GitGutterEnable
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if goyo_disabled_airline
|
if goyo_disabled_airline && !exists("#airline")
|
||||||
AirlineToggle
|
AirlineToggle
|
||||||
|
AirlineRefresh
|
||||||
|
endif
|
||||||
|
|
||||||
|
if goyo_disabled_powerline && !exists("#PowerlineMain")
|
||||||
|
doautocmd PowerlineStartup VimEnter
|
||||||
|
silent! PowerlineReloadColorscheme
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user