mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 05:13:53 -05:00
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:
@@ -193,8 +193,10 @@ function! fugitive#detect(path) abort
|
||||
let &mls = save_mls
|
||||
endtry
|
||||
endif
|
||||
cnoremap <buffer> <expr> <C-R><C-G> fnameescape(<SID>recall())
|
||||
nnoremap <buffer> <silent> y<C-G> :call setreg(v:register, <SID>recall())<CR>
|
||||
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'), '^\.%(,|$)', ''))
|
||||
|
||||
Reference in New Issue
Block a user