Merge pull request #7 from michamos/no-mappings

Make the default mappings optional
This commit is contained in:
Tom McDonald 2013-12-10 12:06:42 -05:00
commit 910392c0a4
2 changed files with 17 additions and 0 deletions

View File

@ -45,6 +45,19 @@ text will the be changed to:
It should be noted that I don't actually go by that nickname.
SETTINGS *exchange-settings*
*g:exchange_no_mappings*
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 as follows:
nmap cx <Plug>Exchange
vmap cx <Plug>Exchange
nmap cxc <Plug>ExchangeClear
nmap cxx <Plug>ExchangeLine
ISSUES AND TODO *lion-issues* *lion-todo*
See https://github.com/tommcdo/vim-exchange/issues for bugs and issues.

View File

@ -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>ExchangeLine :<C-u>set opfunc=<SID>exchange_set<CR>g@_
if exists('g:exchange_no_mappings')
finish
endif
nmap cx <Plug>Exchange
vmap cx <Plug>Exchange
nmap cxc <Plug>ExchangeClear