diff --git a/vim/plugin/git.vim b/vim/plugin/git.vim index 5551307..f7a6e1d 100644 --- a/vim/plugin/git.vim +++ b/vim/plugin/git.vim @@ -145,6 +145,15 @@ function! s:git_blame(first, last) return map(l:data, {idx, ary -> ary[1][match(ary[1], '\s\+\zs'):]}) endfun +function! s:git_root_to_path() + let l:root = substitute(system('git rev-parse --show-toplevel'), '\n\_.*', '', '') + if !v:shell_error + let &path.=','.l:root.'/**' + end +endfun + +call s:git_root_to_path() + command! -range Blame echom join(uniq(sort(git_blame(, ))), ', ') command! -range DBlame !git blame % -L , command! GitNext try