diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 1f3dafa..6310b24 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4678,23 +4678,23 @@ function! fugitive#MapJumps(...) abort nnoremap gO :exe GF("vsplit") nnoremap O :exe GF("tabedit") nnoremap p :exe GF("pedit") + + if exists(':CtrlP') && get(g:, 'ctrl_p_map') =~? '^$' + nnoremap :execute line('.') == 1 ? 'CtrlP ' . fnameescape(Tree()) : PreviousFileHunk(v:count1) + else + nnoremap :execute PreviousFileHunk(v:count1) + endif + nnoremap :execute NextFileHunk(v:count1) + nnoremap ( :execute PreviousFileHunk(v:count1) + nnoremap ) :execute NextFileHunk(v:count1) + nnoremap K :execute PreviousFileHunk(v:count1) + nnoremap J :execute NextFileHunk(v:count1) endif exe "nnoremap " s:nowait "- :exe 'Gedit ' . fnameescape(NavigateUp(v:count1)) if getline(1) =~# '^tree \x\{40,\}$' && empty(getline(2))call search('^'.escape(expand('#:t'),'.*[]~\').'/\=$','wc')endif" nnoremap P :exe 'Gedit ' . fnameescape(ContainingCommit().'^'.v:count1.Relative(':')) nnoremap ~ :exe 'Gedit ' . fnameescape(ContainingCommit().'~'.v:count1.Relative(':')) nnoremap C :exe 'Gedit ' . fnameescape(ContainingCommit()) - if exists(':CtrlP') && get(g:, 'ctrl_p_map') =~? '^$' - nnoremap :execute line('.') == 1 ? 'CtrlP ' . fnameescape(Tree()) : PreviousFileHunk(v:count1) - else - nnoremap :execute PreviousFileHunk(v:count1) - endif - nnoremap :execute NextFileHunk(v:count1) - nnoremap ( :execute PreviousFileHunk(v:count1) - nnoremap ) :execute NextFileHunk(v:count1) - nnoremap K :execute PreviousFileHunk(v:count1) - nnoremap J :execute NextFileHunk(v:count1) - nnoremap co :echoerr 'Use CTRL-W C' nnoremap C :exe 'Gsplit ' . fnameescape(ContainingCommit()) nnoremap cp :echoerr 'Use gC'