Document <C-}>, cleanup formatting

This commit is contained in:
Tim Pope 2007-05-10 04:59:47 +00:00
parent 4606cef260
commit e801be2fca

View File

@ -27,11 +27,11 @@ Vim 7 is recommended for full functionality.
MAPPINGS *surround-mappings* MAPPINGS *surround-mappings*
Delete surroundings is *ds*. The next character given determines the target Delete surroundings is *ds* . The next character given determines the target
to delete. The exact nature of the target are explained in to delete. The exact nature of the target are explained in |surround-targets|
|surround-targets| but essentially it is the last character of a but essentially it is the last character of a |text-object|. This mapping
|text-object|. This mapping deletes the difference between the "inner" deletes the difference between the "inner" object and "an" object. This is
object and "an" object. This is easiest to understand with some examples: easiest to understand with some examples:
Old text Command New text ~ Old text Command New text ~
"Hello *world!" ds" Hello world! "Hello *world!" ds" Hello world!
@ -51,7 +51,7 @@ below in |surround-replacements|. Once again, examples are in order.
*ys* takes an valid Vim motion or text object as the first object, and wraps *ys* takes an valid Vim motion or text object as the first object, and wraps
it using the second argument as with |cs|. (Unfortunately there's no good it using the second argument as with |cs|. (Unfortunately there's no good
mnemonic for "ys"). mnemonic for "ys".)
Old text Command New text ~ Old text Command New text ~
Hello w*orld! ysiw) Hello (world)! Hello w*orld! ysiw) Hello (world)!
@ -114,7 +114,7 @@ that you can specify a numerical argument if you want to get to a tag other
than the innermost one. than the innermost one.
The letters w, W, and s correspond to a |word|, a |WORD|, and a |sentence|, The letters w, W, and s correspond to a |word|, a |WORD|, and a |sentence|,
respectively. These are special in that they have nothing do delete, and respectively. These are special in that they have nothing to delete, and
used with |ds| they are a no-op. With |cs|, one could consider them a used with |ds| they are a no-op. With |cs|, one could consider them a
slight shortcut for ysi (cswb == ysiwb, more or less). slight shortcut for ysi (cswb == ysiwb, more or less).
@ -124,23 +124,25 @@ however, newlines are sometimes added and/or removed.
REPLACEMENTS *surround-replacements* REPLACEMENTS *surround-replacements*
A replacement argument is a single character, and is required by |cs|, |ys|, A replacement argument is a single character, and is required by |cs|, |ys|,
and |vs|. Undefined replacement characters (with the exception of and |vs|. Undefined replacement characters (with the exception of alphabetic
alphabetic characters) default to placing themselves at the beginning and characters) default to placing themselves at the beginning and end of the
end of the destination, which can be useful for characters like / and |. destination, which can be useful for characters like / and |.
If either ), }, ], or > is used, the text is wrapped in the appropriate If either ), }, ], or > is used, the text is wrapped in the appropriate pair
pair of characters. Similar behavior can be found with (, {, and [ (but not of characters. Similar behavior can be found with (, {, and [ (but not <),
<), which append an additional space to the inside. Like with the targets which append an additional space to the inside. Like with the targets above,
above, b, B, r, and a are aliases for ), }, ], and >. b, B, r, and a are aliases for ), }, ], and >. To fulfill the common need for
code blocks in C-style languages, <C-}> (which is really <C-]>) adds braces on
lines separate from the content.
If t or < is used, Vim prompts for an HTML/XML tag to insert. You may If t or < is used, Vim prompts for an HTML/XML tag to insert. You may specify
specify attributes here and they will be stripped from the closing tag. attributes here and they will be stripped from the closing tag. End your
End your input by pressing <CR> or >. As an experimental feature, if <C-T> input by pressing <CR> or >. If <C-T> is used, the tags will appear on lines
is used, the tags will appear on lines by themselves. by themselves.
A deprecated replacement of a LaTeX environment is provided on \ and l. A deprecated replacement of a LaTeX environment is provided on \ and l. The
The name of the environment and any arguments will be input from a prompt. name of the environment and any arguments will be input from a prompt. This
This will be removed once a more fully functional customization system is will be removed once a more fully functional customization system is
implemented. The following shows the resulting environment from implemented. The following shows the resulting environment from
csp\tabular}{lc<CR> csp\tabular}{lc<CR>
> >