From f7db6a1f361ff48bbe860bc5bc4c755e567e486a Mon Sep 17 00:00:00 2001 From: micbou Date: Fri, 5 May 2017 21:12:41 +0200 Subject: [PATCH] Update autocommands examples --- README.md | 10 ++++++---- doc/youcompleteme.txt | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 08382b08..329c4b23 100644 --- a/README.md +++ b/README.md @@ -1652,9 +1652,11 @@ For instance: ```viml function! s:CustomizeYcmLocationWindow() " Move the window to the top of the screen. - execute "wincmd K" + wincmd K " Set the window height to 5. - execute "5wincmd _" + 5wincmd _ + " Switch back to working window. + wincmd p endfunction autocmd User YcmLocationOpened call s:CustomizeYcmLocationWindow() @@ -1671,9 +1673,9 @@ instance: ```viml function! s:CustomizeYcmQuickFixWindow() " Move the window to the top of the screen. - execute "wincmd K" + wincmd K " Set the window height to 5. - execute "5wincmd _" + 5wincmd _ endfunction autocmd User YcmQuickFixOpened call s:CustomizeYcmQuickFixWindow() diff --git a/doc/youcompleteme.txt b/doc/youcompleteme.txt index 19fb61db..ab2c1c06 100644 --- a/doc/youcompleteme.txt +++ b/doc/youcompleteme.txt @@ -1946,9 +1946,11 @@ For instance: > function! s:CustomizeYcmLocationWindow() " Move the window to the top of the screen. - execute "wincmd K" + wincmd K " Set the window height to 5. - execute "5wincmd _" + 5wincmd _ + " Switch back to working window. + wincmd p endfunction autocmd User YcmLocationOpened call s:CustomizeYcmLocationWindow() @@ -1965,9 +1967,9 @@ quickfix window. For instance: > function! s:CustomizeYcmQuickFixWindow() " Move the window to the top of the screen. - execute "wincmd K" + wincmd K " Set the window height to 5. - execute "5wincmd _" + 5wincmd _ endfunction autocmd User YcmQuickFixOpened call s:CustomizeYcmQuickFixWindow()