Make the default mappings optional
This commit is contained in:
parent
ae6495dafc
commit
00b3dd0274
@ -45,6 +45,17 @@ text will the be changed to:
|
|||||||
|
|
||||||
It should be noted that I don't actually go by that nickname.
|
It should be noted that I don't actually go by that nickname.
|
||||||
|
|
||||||
|
SETTINGS *exchange-settings*
|
||||||
|
|
||||||
|
*g:exchange_no_mappings*
|
||||||
|
If this variable is defined, the default keyboard mappings will not be
|
||||||
|
loaded. You are then free to define your own.
|
||||||
|
The default mappings are
|
||||||
|
nmap cx <Plug>Exchange
|
||||||
|
vmap cx <Plug>Exchange
|
||||||
|
nmap cxc <Plug>ExchangeClear
|
||||||
|
nmap cxx <Plug>ExchangeLine
|
||||||
|
|
||||||
ISSUES AND TODO *lion-issues* *lion-todo*
|
ISSUES AND TODO *lion-issues* *lion-todo*
|
||||||
|
|
||||||
See https://github.com/tommcdo/vim-exchange/issues for bugs and issues.
|
See https://github.com/tommcdo/vim-exchange/issues for bugs and issues.
|
||||||
|
@ -110,6 +110,10 @@ vnoremap <silent> <Plug>Exchange :<C-u>call <SID>exchange_set(visualmode(), 1)<C
|
|||||||
nnoremap <silent> <Plug>ExchangeClear :<C-u>call <SID>exchange_clear()<CR>
|
nnoremap <silent> <Plug>ExchangeClear :<C-u>call <SID>exchange_clear()<CR>
|
||||||
nnoremap <silent> <Plug>ExchangeLine :<C-u>set opfunc=<SID>exchange_set<CR>g@_
|
nnoremap <silent> <Plug>ExchangeLine :<C-u>set opfunc=<SID>exchange_set<CR>g@_
|
||||||
|
|
||||||
|
if exists('g:exchange_no_mappings')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
nmap cx <Plug>Exchange
|
nmap cx <Plug>Exchange
|
||||||
vmap cx <Plug>Exchange
|
vmap cx <Plug>Exchange
|
||||||
nmap cxc <Plug>ExchangeClear
|
nmap cxc <Plug>ExchangeClear
|
||||||
|
Loading…
Reference in New Issue
Block a user