Add :ExchangeClear command

This commit is contained in:
cohama 2014-11-24 23:18:59 +09:00 committed by Tom McDonald
parent f841536eac
commit 3eea6c08fd
2 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,11 @@ cxc Clear any defined region of text (previously defined
*v_X* *exchange-visual*
{Visual}X Can be used in |visual-mode|.
COMMANDS *exchange-commands*
*exchange-:ExchangeClear*
:ExchangeClear Ex-command version of |cxc|.
EXAMPLES *exchange-examples*
In the text below, we will exchange everything inside the parentheses with

View File

@ -210,6 +210,8 @@ vnoremap <silent> <Plug>(Exchange) :<C-u>call <SID>exchange_set(visualmode(), 1)
nnoremap <silent> <Plug>(ExchangeClear) :<C-u>call <SID>exchange_clear()<CR>
nnoremap <silent> <Plug>(ExchangeLine) :<C-u>set opfunc=<SID>exchange_set<CR>g@_
command! ExchangeClear call s:exchange_clear()
if exists('g:exchange_no_mappings')
finish
endif