From ff52604e806c36396799f446d59d464a2453bdb9 Mon Sep 17 00:00:00 2001 From: Christian Wellenbrock Date: Tue, 25 Feb 2014 00:19:48 +0100 Subject: [PATCH 1/2] Use X as visual mapping for Exchange --- plugin/exchange.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/exchange.vim b/plugin/exchange.vim index ccb62b9..d3222de 100644 --- a/plugin/exchange.vim +++ b/plugin/exchange.vim @@ -198,6 +198,6 @@ if exists('g:exchange_no_mappings') endif call s:create_map('n', 'cx', '(Exchange)') -call s:create_map('v', 'cx', '(Exchange)') +call s:create_map('v', 'X', '(Exchange)') call s:create_map('n', 'cxc', '(ExchangeClear)') call s:create_map('n', 'cxx', '(ExchangeLine)') From 0e43efeeded22fbc71a45bdb2f25dda8e20b64f5 Mon Sep 17 00:00:00 2001 From: Christian Wellenbrock Date: Tue, 25 Feb 2014 01:37:04 +0100 Subject: [PATCH 2/2] Update Readme and docs regarding {visual}X --- README.md | 2 +- doc/exchange.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 302e42f..a8ca929 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Clear any {motion} pending for exchange. ### Notes about the mappings -* `cx` can also be used from visual mode, which is sometimes easier than coming +* `X` can be used from visual mode, which is sometimes easier than coming up with the right {motion} * If you're using the same motion again (e.g. exchanging two words using `cxiw`), you can use `.` the second time. diff --git a/doc/exchange.txt b/doc/exchange.txt index 203bf48..200ffdc 100644 --- a/doc/exchange.txt +++ b/doc/exchange.txt @@ -20,7 +20,6 @@ cx{motion} Used in pairs. exchanged. Any valid {motion} can be used. SECOND USE: define the second region of text and perform the exchange. - Can also be used in |visual-mode|. Note: If a region was defined accidentally, it can be cleared with |cxc| @@ -31,6 +30,9 @@ cxx Like |cx|, but for the current line. |linewise| cxc Clear any defined region of text (previously defined by a |cx| command) + *v_X* *exchange-visual* +{visal}X Can be used in |visual-mode|. + EXAMPLES *exchange-examples* In the text below, we will exchange everything inside the parentheses with