diff --git a/plugin/exchange.vim b/plugin/exchange.vim index 4b659be..8717ac1 100644 --- a/plugin/exchange.vim +++ b/plugin/exchange.vim @@ -98,12 +98,15 @@ function! s:exchange_set(type, ...) endif endfunction -function! s:exchange_clear() +function! s:exchange_clear(...) unlet! b:exchange if exists('b:exchange_matches') call s:highlight_clear(b:exchange_matches) unlet b:exchange_matches endif + if a:0 + echohl WarningMsg | echo ":ExchangeClear will be deprecated in favor of :XchangeClear" | echohl None + endif endfunction function! s:save_reg(name) @@ -225,7 +228,8 @@ vnoremap (Exchange) :call exchange_set(visualmode(), 1) nnoremap (ExchangeClear) :call exchange_clear() nnoremap (ExchangeLine) :set opfunc=exchange_setg@_ -command! ExchangeClear call s:exchange_clear() +command! ExchangeClear call s:exchange_clear(1) +command! XchangeClear call s:exchange_clear() if exists('g:exchange_no_mappings') finish