Provide g:fugitive_no_maps to disable key maps

Add variable g:fugitive_no_maps. If set y<C-G> and <C-R><C-G> are not
mapped.

Resolves tpope/vim-fugitive#394
This commit is contained in:
Fedor Gusev 2015-02-11 15:14:53 +03:00 committed by Tim Pope
parent e8b94098bb
commit 0095769029

View File

@ -193,8 +193,10 @@ function! fugitive#detect(path) abort
let &mls = save_mls
endtry
endif
if !exists('g:fugitive_no_maps')
cnoremap <buffer> <expr> <C-R><C-G> fnameescape(<SID>recall())
nnoremap <buffer> <silent> y<C-G> :call setreg(v:register, <SID>recall())<CR>
endif
let buffer = fugitive#buffer()
if expand('%:p') =~# '//'
call buffer.setvar('&path', s:sub(buffer.getvar('&path'), '^\.%(,|$)', ''))