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
|
set viminfo='10,\"100,:20,%,n~/.viminfo
|
||||||
" Jump back when editing a file
|
" Jump back when editing a file
|
||||||
function! ResCur()
|
function! ResCur()
|
||||||
|
" Don't jump in git commits since they're generated.
|
||||||
|
if &ft == 'gitcommit'
|
||||||
|
return
|
||||||
|
endif
|
||||||
if line("'\"") <= line("$")
|
if line("'\"") <= line("$")
|
||||||
normal! g`"
|
normal! g`"
|
||||||
return 1
|
return
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
augroup resCur
|
augroup resCur
|
||||||
|
|||||||
Reference in New Issue
Block a user