Define global <Plug> maps regardless of g:fugitive_no_maps

This commit is contained in:
Tim Pope
2022-06-07 03:59:28 -04:00
parent 4aeca0c566
commit 118e9de937

View File

@@ -726,6 +726,9 @@ augroup fugitive
autocmd User ProjectionistDetect call s:ProjectionistDetect() autocmd User ProjectionistDetect call s:ProjectionistDetect()
augroup END augroup END
nmap <script><silent> <Plug>fugitive:y<C-G> :<C-U>call setreg(v:register, fugitive#Object(@%))<CR>
nmap <script> <Plug>fugitive: <Nop>
if get(g:, 'fugitive_no_maps') if get(g:, 'fugitive_no_maps')
finish finish
endif endif
@@ -755,5 +758,3 @@ endfunction
call s:Map('c', '<C-R><C-G>', 'fnameescape(fugitive#Object(@%))', '<expr>') call s:Map('c', '<C-R><C-G>', 'fnameescape(fugitive#Object(@%))', '<expr>')
call s:Map('n', 'y<C-G>', ':<C-U>call setreg(v:register, fugitive#Object(@%))<CR>', '<silent>') call s:Map('n', 'y<C-G>', ':<C-U>call setreg(v:register, fugitive#Object(@%))<CR>', '<silent>')
nmap <script><silent> <Plug>fugitive:y<C-G> :<C-U>call setreg(v:register, fugitive#Object(@%))<CR>
nmap <script> <Plug>fugitive: <Nop>