diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 7fa4a96..40166ac 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -5847,10 +5847,6 @@ function! fugitive#Init() abort let &mls = save_mls endtry endif - if !exists('g:fugitive_no_maps') - call s:Map('c', '', 'fnameescape(fugitive#Object(@%))', '') - call s:Map('n', 'y', ':call setreg(v:register, fugitive#Object(@%))', '') - endif let dir = s:Dir() if stridx(&tags, escape(dir, ', ')) == -1 && &tags !~# '\.git' && !exists('s:tags_warning') let actualdir = fugitive#Find('.git/', dir) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index e86fc0a..c0773b9 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -400,3 +400,38 @@ exe 'command! -bar -bang -nargs=1 -complete=customlist,fugitive#CompleteObject G exe 'command! -bar -bang -nargs=1 -complete=customlist,fugitive#RenameComplete Grename exe fugitive#RenameCommand(, , +"", 0, "", , [])' exe 'command! -bar -bang -range=-1 -nargs=* -complete=customlist,fugitive#CompleteObject Gbrowse exe fugitive#BrowseCommand(, , +"", 0, "", , [])' + +if get(g:, 'fugitive_no_maps') + finish +endif + +let s:nowait = v:version >= 704 ? '' : '' + +function! s:Map(mode, lhs, rhs, ...) abort + for mode in split(a:mode, '\zs') + let flags = (a:0 ? a:1 : '') . (a:rhs =~# '' ? '' : '