Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions doc/surround.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -95,8 +95,18 @@ 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 ))

Fix error in documentation and add examples

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oups

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch, good catch

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).

Expand Down