mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-15 14:53:50 -05:00
Merge pull request #102 from rperce/master
Fix for lightline naming convention change
This commit is contained in:
@@ -34,7 +34,7 @@ endfunction
|
|||||||
|
|
||||||
function! s:set_color(group, attr, color)
|
function! s:set_color(group, attr, color)
|
||||||
let gui = a:color =~ '^#'
|
let gui = a:color =~ '^#'
|
||||||
execute printf("hi %s %s%s=%s", a:group, gui ? 'gui' : 'cterm', a:attr, a:color)
|
execute printf('hi %s %s%s=%s', a:group, gui ? 'gui' : 'cterm', a:attr, a:color)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:blank(repel)
|
function! s:blank(repel)
|
||||||
@@ -207,13 +207,13 @@ function! s:goyo_on(dim)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" vim-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
|
" vim-powerline
|
||||||
let t:goyo_disabled_powerline = exists("#PowerlineMain")
|
let t:goyo_disabled_powerline = exists('#PowerlineMain')
|
||||||
if t:goyo_disabled_powerline
|
if t:goyo_disabled_powerline
|
||||||
augroup PowerlineMain
|
augroup PowerlineMain
|
||||||
autocmd!
|
autocmd!
|
||||||
@@ -222,7 +222,7 @@ function! s:goyo_on(dim)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" lightline.vim
|
" lightline.vim
|
||||||
let t:goyo_disabled_lightline = exists('#LightLine')
|
let t:goyo_disabled_lightline = exists('#lightline')
|
||||||
if t:goyo_disabled_lightline
|
if t:goyo_disabled_lightline
|
||||||
silent! call lightline#disable()
|
silent! call lightline#disable()
|
||||||
endif
|
endif
|
||||||
@@ -330,7 +330,7 @@ function! s:goyo_off()
|
|||||||
let &winheight = wh
|
let &winheight = wh
|
||||||
|
|
||||||
for [k, v] in items(goyo_revert)
|
for [k, v] in items(goyo_revert)
|
||||||
execute printf("let &%s = %s", k, string(v))
|
execute printf('let &%s = %s', k, string(v))
|
||||||
endfor
|
endfor
|
||||||
execute 'colo '. get(g:, 'colors_name', 'default')
|
execute 'colo '. get(g:, 'colors_name', 'default')
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ function! s:goyo_off()
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if goyo_disabled_airline && !exists("#airline")
|
if goyo_disabled_airline && !exists('#airline')
|
||||||
AirlineToggle
|
AirlineToggle
|
||||||
" For some reason, Airline requires two refreshes to avoid display
|
" For some reason, Airline requires two refreshes to avoid display
|
||||||
" artifacts
|
" artifacts
|
||||||
@@ -352,7 +352,7 @@ function! s:goyo_off()
|
|||||||
silent! AirlineRefresh
|
silent! AirlineRefresh
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if goyo_disabled_powerline && !exists("#PowerlineMain")
|
if goyo_disabled_powerline && !exists('#PowerlineMain')
|
||||||
doautocmd PowerlineStartup VimEnter
|
doautocmd PowerlineStartup VimEnter
|
||||||
silent! PowerlineReloadColorscheme
|
silent! PowerlineReloadColorscheme
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user