Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error in documentation and add examples #268

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 13 additions & 3 deletions doc/surround.txt
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

Choose a reason for hiding this comment

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

Oups

Copy link
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