mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Don't jump to a position within git commits in vim.
This commit is contained in:
@@ -33,9 +33,13 @@ set ruler
|
||||
set viminfo='10,\"100,:20,%,n~/.viminfo
|
||||
" Jump back when editing a file
|
||||
function! ResCur()
|
||||
" Don't jump in git commits since they're generated.
|
||||
if &ft == 'gitcommit'
|
||||
return
|
||||
endif
|
||||
if line("'\"") <= line("$")
|
||||
normal! g`"
|
||||
return 1
|
||||
return
|
||||
endif
|
||||
endfunction
|
||||
augroup resCur
|
||||
|
||||
Reference in New Issue
Block a user