diff --git a/doc/exchange.txt b/doc/exchange.txt index fa9e174..5d7bbcc 100644 --- a/doc/exchange.txt +++ b/doc/exchange.txt @@ -45,6 +45,17 @@ 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* + 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 Exchange + vmap cx Exchange + nmap cxc ExchangeClear + nmap cxx ExchangeLine + ISSUES AND TODO *lion-issues* *lion-todo* See https://github.com/tommcdo/vim-exchange/issues for bugs and issues. diff --git a/plugin/exchange.vim b/plugin/exchange.vim index 7414fa0..ea50581 100644 --- a/plugin/exchange.vim +++ b/plugin/exchange.vim @@ -110,6 +110,10 @@ vnoremap Exchange :call exchange_set(visualmode(), 1) ExchangeClear :call exchange_clear() nnoremap ExchangeLine :set opfunc=exchange_setg@_ +if exists('g:exchange_no_mappings') + finish +endif + nmap cx Exchange vmap cx Exchange nmap cxc ExchangeClear