From 4a77929a3292fafb0f8e52b081fd6c83fcfd3218 Mon Sep 17 00:00:00 2001 From: Knut Franke Date: Sat, 4 May 2013 01:28:50 +0200 Subject: [PATCH] Make jump to sha under cursor This is particularly handy for commit messages, which often reference other commits by their abbreviated sha. --- plugin/fugitive.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 550b364..34e7b68 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -2537,6 +2537,10 @@ function! s:GF(mode) abort elseif line('$') == 1 && getline('.') =~ '^\x\{40\}$' let ref = getline('.') + + elseif expand('') =~# '^\x\{7,40\}\>' + return s:Edit(a:mode,0,expand('')) + else let ref = '' endif