mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-14 00:49:01 +08: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:
1 parent
dff9b92cde
commit
4a77929a32
1 file changed
+4
@@ -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