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:
parent
dff9b92cde
commit
4a77929a32
@ -2537,6 +2537,10 @@ function! s:GF(mode) abort
|
|||||||
|
|
||||||
elseif line('$') == 1 && getline('.') =~ '^\x\{40\}$'
|
elseif line('$') == 1 && getline('.') =~ '^\x\{40\}$'
|
||||||
let ref = getline('.')
|
let ref = getline('.')
|
||||||
|
|
||||||
|
elseif expand('<cword>') =~# '^\x\{7,40\}\>'
|
||||||
|
return s:Edit(a:mode,0,expand('<cword>'))
|
||||||
|
|
||||||
else
|
else
|
||||||
let ref = ''
|
let ref = ''
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user