diff --git a/Customization.md b/Customization.md index 939f5cc..e6bd47d 100644 --- a/Customization.md +++ b/Customization.md @@ -1,7 +1,7 @@ ## Callbacks for GVim ```vim -function! g:goyo_before() +function! Goyo_before() if has('gui_running') set fullscreen set background=light @@ -11,7 +11,7 @@ function! g:goyo_before() endif endfunction -function! g:goyo_after() +function! Goyo_after() if has('gui_running') set nofullscreen set background=dark @@ -21,7 +21,7 @@ function! g:goyo_after() endif endfunction -let g:goyo_callbacks = [function('g:goyo_before'), function('g:goyo_after')] +let g:goyo_callbacks = [function('Goyo_before'), function('Goyo_after')] ``` ## Disabling plugins @@ -42,17 +42,17 @@ let g:goyo_callbacks = [function('s:goyo_before')] - by [EPNGH](https://github.com/EPNGH) ```vim -function! g:goyo_before() +function! Goyo_before() delcommand ZoomWin delcommand ZoomWin endfunction -function! g:goyo_after() +function! Goyo_after() command! ZoomWin call ZoomWin() command! ZoomWin call ZoomWin() endfunction -let g:goyo_callbacks = [function('g:goyo_before'), function('g:goyo_after')] +let g:goyo_callbacks = [function('Goyo_before'), function('Goyo_after')] ``` ## Ensure `:q` to quit even when Goyo is active @@ -60,14 +60,14 @@ let g:goyo_callbacks = [function('g:goyo_before'), function('g:goyo_after')] Suggested by [mm2703](https://github.com/mm2703) and [axelGschaider](https://github.com/axelGschaider) in [#16](https://github.com/junegunn/goyo.vim/issues/16) ```vim -function! g:goyo_before() +function! Goyo_before() let b:quitting = 0 let b:quitting_bang = 0 autocmd QuitPre let b:quitting = 1 cabbrev q! let b:quitting_bang = 1 q! endfunction -function! g:goyo_after() +function! Goyo_after() " Quit Vim if this is the only remaining buffer if b:quitting && len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1 if b:quitting_bang @@ -78,5 +78,5 @@ function! g:goyo_after() endif endfunction -let g:goyo_callbacks = [function('g:goyo_before'), function('g:goyo_after')] +let g:goyo_callbacks = [function('Goyo_before'), function('Goyo_after')] ```