Don't jump to last cursor position in vim for git commits

This commit is contained in:
Daniel Flanagan 2017-03-16 19:56:00 -05:00
parent ad7128bfc7
commit 0ecbd2497c

View file

@ -364,9 +364,10 @@ augroup vimrc
au BufWinEnter * if &fdm == 'indent' | setlocal foldmethod=manual | endif au BufWinEnter * if &fdm == 'indent' | setlocal foldmethod=manual | endif
augroup END augroup END
" jump to last opened position in file " jump to last opened position in file except in git commits
let jump_to_pos_blacklist = ['gitcommit']
if has("autocmd") if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") && index(blacklist, &ft) | exe "normal! g'\"" | endif
endif endif
" no empty buffer on startup " no empty buffer on startup