mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-15 14:53:51 -05:00
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user