diff --git a/vimrc b/vimrc index 3198a53..e49c75d 100644 --- a/vimrc +++ b/vimrc @@ -146,6 +146,12 @@ if has('autocmd') autocmd User GoyoEnter nested call goyo_enter() autocmd User GoyoLeave nested call goyo_leave() + + augroup VCenterCursor + au! + au BufEnter,WinEnter,WinNew,VimResized *,*.* + \ let &scrolloff=winheight(win_getid())/2 + augroup END endif if has('folding')