Make <CR> jump to sha under cursor

This is particularly handy for commit messages, which often reference
other commits by their abbreviated sha.
This commit is contained in:
Knut Franke 2013-05-04 01:28:50 +02:00 committed by Tim Pope
parent dff9b92cde
commit 4a77929a32

View File

@ -2537,6 +2537,10 @@ function! s:GF(mode) abort
elseif line('$') == 1 && getline('.') =~ '^\x\{40\}$'
let ref = getline('.')
elseif expand('<cword>') =~# '^\x\{7,40\}\>'
return s:Edit(a:mode,0,expand('<cword>'))
else
let ref = ''
endif