mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 13:23:52 -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
|
let &mls = save_mls
|
||||||
endtry
|
endtry
|
||||||
endif
|
endif
|
||||||
cnoremap <buffer> <expr> <C-R><C-G> fnameescape(<SID>recall())
|
if !exists('g:fugitive_no_maps')
|
||||||
nnoremap <buffer> <silent> y<C-G> :call setreg(v:register, <SID>recall())<CR>
|
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()
|
let buffer = fugitive#buffer()
|
||||||
if expand('%:p') =~# '//'
|
if expand('%:p') =~# '//'
|
||||||
call buffer.setvar('&path', s:sub(buffer.getvar('&path'), '^\.%(,|$)', ''))
|
call buffer.setvar('&path', s:sub(buffer.getvar('&path'), '^\.%(,|$)', ''))
|
||||||
|
|||||||
Reference in New Issue
Block a user