vimrc: tweak save_cursor_position augroup
This commit is contained in:
parent
bbc76bc4cd
commit
eae61fe67c
@ -801,8 +801,11 @@ augroup END
|
|||||||
|
|
||||||
" when quitting a file, save the cursor position
|
" when quitting a file, save the cursor position
|
||||||
augroup save_cursor_position
|
augroup save_cursor_position
|
||||||
|
if &filetype !~# 'commit\|rebase'
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd BufReadPost * call setpos(".", getpos("'\""))
|
" also automatically open any folds the cursor might land on.
|
||||||
|
autocmd BufReadPost * silent! normal! g`" zv
|
||||||
|
endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" when not running in a console or a terminal that doesn't support 256 colors
|
" when not running in a console or a terminal that doesn't support 256 colors
|
||||||
|
Loading…
Reference in New Issue
Block a user