From 9cea5e5c7dcf2bcc05c9f63d88212919407cf193 Mon Sep 17 00:00:00 2001 From: Robert Perce Date: Thu, 17 Mar 2016 01:09:30 -0500 Subject: [PATCH 1/2] Fix lightline check, per itchyny/lightline.vim@0f62126 --- autoload/goyo.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/goyo.vim b/autoload/goyo.vim index edacd10..86a636c 100644 --- a/autoload/goyo.vim +++ b/autoload/goyo.vim @@ -222,7 +222,7 @@ function! s:goyo_on(dim) endif " lightline.vim - let t:goyo_disabled_lightline = exists('#LightLine') + let t:goyo_disabled_lightline = exists('#lightline') if t:goyo_disabled_lightline silent! call lightline#disable() endif From 26f06ba05c45a041ce895a786441c3974fa70578 Mon Sep 17 00:00:00 2001 From: Robert Perce Date: Thu, 17 Mar 2016 01:11:14 -0500 Subject: [PATCH 2/2] Use single quotes wherever possible --- autoload/goyo.vim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/autoload/goyo.vim b/autoload/goyo.vim index 86a636c..4b15bc8 100644 --- a/autoload/goyo.vim +++ b/autoload/goyo.vim @@ -34,7 +34,7 @@ endfunction function! s:set_color(group, attr, 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 function! s:blank(repel) @@ -207,13 +207,13 @@ function! s:goyo_on(dim) endif " vim-airline - let t:goyo_disabled_airline = exists("#airline") + let t:goyo_disabled_airline = exists('#airline') if t:goyo_disabled_airline AirlineToggle endif " vim-powerline - let t:goyo_disabled_powerline = exists("#PowerlineMain") + let t:goyo_disabled_powerline = exists('#PowerlineMain') if t:goyo_disabled_powerline augroup PowerlineMain autocmd! @@ -330,7 +330,7 @@ function! s:goyo_off() let &winheight = wh for [k, v] in items(goyo_revert) - execute printf("let &%s = %s", k, string(v)) + execute printf('let &%s = %s', k, string(v)) endfor execute 'colo '. get(g:, 'colors_name', 'default') @@ -344,7 +344,7 @@ function! s:goyo_off() endif endif - if goyo_disabled_airline && !exists("#airline") + if goyo_disabled_airline && !exists('#airline') AirlineToggle " For some reason, Airline requires two refreshes to avoid display " artifacts @@ -352,7 +352,7 @@ function! s:goyo_off() silent! AirlineRefresh endif - if goyo_disabled_powerline && !exists("#PowerlineMain") + if goyo_disabled_powerline && !exists('#PowerlineMain') doautocmd PowerlineStartup VimEnter silent! PowerlineReloadColorscheme endif