Keep current line in centre of window
https://vim.fandom.com/wiki/Keep_your_cursor_centered_vertically_on_the_screen
This commit is contained in:
parent
ac3709eb2a
commit
5a00c2967a
1 changed files with 6 additions and 0 deletions
6
vimrc
6
vimrc
|
@ -146,6 +146,12 @@ if has('autocmd')
|
|||
|
||||
autocmd User GoyoEnter nested call <SID>goyo_enter()
|
||||
autocmd User GoyoLeave nested call <SID>goyo_leave()
|
||||
|
||||
augroup VCenterCursor
|
||||
au!
|
||||
au BufEnter,WinEnter,WinNew,VimResized *,*.*
|
||||
\ let &scrolloff=winheight(win_getid())/2
|
||||
augroup END
|
||||
endif
|
||||
|
||||
if has('folding')
|
||||
|
|
Loading…
Reference in a new issue