From 99342051608b0278a49d9fc86c3d009dc6e65181 Mon Sep 17 00:00:00 2001 From: Johannes Hoffmann Date: Sun, 21 Oct 2018 14:22:26 +0200 Subject: [PATCH 1/3] Fix error in documentation and add examples --- doc/surround.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/surround.txt b/doc/surround.txt index 674b6a9..20a1681 100644 --- a/doc/surround.txt +++ b/doc/surround.txt @@ -95,8 +95,17 @@ possible targets are based closely on the |text-objects| provided by Vim. All targets are currently just one character. Eight punctuation marks, (, ), {, }, [, ], <, and >, represent themselves -and their counterparts. If the opening mark is used, contained whitespace is -also trimmed. The targets b, B, r, and a are aliases for ), }, ], and > +and their counterparts. If the opening mark is used, whitespace is inserted +around the target. + + Old text Command New text ~ + *"$#" -ne 3 ysf3 [ "$#" -ne 3 ] + *[ "$#" -ne 3 ] ys%] [[ "$#" -ne 3 ]] + $total*+=1 yst1SPCSPC $total += 1 + $*total += 1 ysf1( $( total += 1 ) + $*( total += 1 ) ys%) $(( total += 1 )) + +The targets b, B, r, and a are aliases for ), }, ], and > (the first two mirror Vim; the second two are completely arbitrary and subject to change). From 30d079912de8d997754d14c1067b249d4212af4d Mon Sep 17 00:00:00 2001 From: Johannes Hoffmann Date: Sun, 21 Oct 2018 14:23:54 +0200 Subject: [PATCH 2/3] Correct whitespace --- doc/surround.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/surround.txt b/doc/surround.txt index 20a1681..7091e50 100644 --- a/doc/surround.txt +++ b/doc/surround.txt @@ -61,7 +61,7 @@ As a special case, *yss* operates on the current line, ignoring leading whitespace. Old text Command New text ~ - Hello w*orld! yssB {Hello world!} + Hello w*orld! yssB {Hello world!} There is also *yS* and *ySS* which indent the surrounded text and place it on a line of its own. @@ -105,6 +105,7 @@ around the target. $*total += 1 ysf1( $( total += 1 ) $*( total += 1 ) ys%) $(( total += 1 )) +Fix error in documentation and add examples The targets b, B, r, and a are aliases for ), }, ], and > (the first two mirror Vim; the second two are completely arbitrary and subject to change). From 3f1645606056834a53fa92997b3b86369c5b2a3d Mon Sep 17 00:00:00 2001 From: Johannes Hoffmann Date: Wed, 31 Oct 2018 13:11:50 +0100 Subject: [PATCH 3/3] Remove erroneously added text --- doc/surround.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/surround.txt b/doc/surround.txt index 7091e50..0d31fb1 100644 --- a/doc/surround.txt +++ b/doc/surround.txt @@ -105,7 +105,6 @@ around the target. $*total += 1 ysf1( $( total += 1 ) $*( total += 1 ) ys%) $(( total += 1 )) -Fix error in documentation and add examples The targets b, B, r, and a are aliases for ), }, ], and > (the first two mirror Vim; the second two are completely arbitrary and subject to change).