mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Deprecate CTRL-N and CTRL-P
This commit is contained in:
@@ -6886,12 +6886,8 @@ function! fugitive#MapJumps(...) abort
|
|||||||
call s:Map('n', 'p', ':<C-U>exe <SID>GF("pedit")<CR>', '<silent>')
|
call s:Map('n', 'p', ':<C-U>exe <SID>GF("pedit")<CR>', '<silent>')
|
||||||
|
|
||||||
if !exists('g:fugitive_no_maps')
|
if !exists('g:fugitive_no_maps')
|
||||||
if exists(':CtrlP') && get(g:, 'ctrl_p_map') =~? '^<c-p>$'
|
call s:Map('n', '<C-P>', ':exe <SID>PreviousItem(v:count1)<Bar>echohl WarningMsg<Bar>echo "CTRL-P is deprecated in favor of ("<Bar>echohl NONE<CR>', '<unique>')
|
||||||
nnoremap <buffer> <silent> <C-P> :<C-U>execute line('.') == 1 ? 'CtrlP ' . s:fnameescape(<SID>Tree()) : <SID>PreviousItem(v:count1)<CR>
|
call s:Map('n', '<C-N>', ':exe <SID>NextItem(v:count1)<Bar>echohl WarningMsg<Bar>echo "CTRL-N is deprecated in favor of )"<Bar>echohl NONE<CR>', '<unique>')
|
||||||
else
|
|
||||||
nnoremap <buffer> <silent> <C-P> :<C-U>execute <SID>PreviousItem(v:count1)<CR>
|
|
||||||
endif
|
|
||||||
nnoremap <buffer> <silent> <C-N> :<C-U>execute <SID>NextItem(v:count1)<CR>
|
|
||||||
endif
|
endif
|
||||||
call s:MapMotion('(', 'exe <SID>PreviousItem(v:count1)')
|
call s:MapMotion('(', 'exe <SID>PreviousItem(v:count1)')
|
||||||
call s:MapMotion(')', 'exe <SID>NextItem(v:count1)')
|
call s:MapMotion(')', 'exe <SID>NextItem(v:count1)')
|
||||||
|
|||||||
Reference in New Issue
Block a user