mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 07:13:52 -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\}$'
|
||||
let ref = getline('.')
|
||||
|
||||
elseif expand('<cword>') =~# '^\x\{7,40\}\>'
|
||||
return s:Edit(a:mode,0,expand('<cword>'))
|
||||
|
||||
else
|
||||
let ref = ''
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user