From 3eea6c08fd060a40061e38fe2eb6c171ee7a75bb Mon Sep 17 00:00:00 2001 From: cohama Date: Mon, 24 Nov 2014 23:18:59 +0900 Subject: [PATCH] Add :ExchangeClear command --- doc/exchange.txt | 5 +++++ plugin/exchange.vim | 2 ++ 2 files changed, 7 insertions(+) diff --git a/doc/exchange.txt b/doc/exchange.txt index 5a08b68..7a9ed68 100644 --- a/doc/exchange.txt +++ b/doc/exchange.txt @@ -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 diff --git a/plugin/exchange.vim b/plugin/exchange.vim index 613b3f0..4f1624f 100644 --- a/plugin/exchange.vim +++ b/plugin/exchange.vim @@ -210,6 +210,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() + if exists('g:exchange_no_mappings') finish endif