Documentation bug in :help /\]

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Documentation bug in :help /\]

Benjamin Fritz
I stumbled on this earlier this week.

:help /\] says:

        - To include a literal ']', '^', '-' or '\' in the collection, put a
          backslash before it: "[xyz\]]", "[\^xyz]", "[xy\-z]" and "[xyz\\]".
          ...
          For '-' you can also make it the first or last character: "[-xyz]",
          "[^-xyz]" or "[xyz-]".  For '\' you can also let it be followed by
          any character that's not in "^]-\bertn".

I think that last sentence should be:

    For '\' you can also let it be followed by any character that's
not in "^]-\bertndoxuU".

Unless there is some reason to exclude the translation codes:

                \d123 decimal number of character
                \o40 octal number of character up to 0377
                \x20 hexadecimal number of character up to 0xff
                \u20AC hex. number of multibyte character up to 0xffff
                \U1234 hex. number of multibyte character up to 0xffffffff

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Documentation bug in :help /\]

Bram Moolenaar

Ben Fritz wrote:

> I stumbled on this earlier this week.
>
> :help /\] says:
>
> - To include a literal ']', '^', '-' or '\' in the collection, put a
>  backslash before it: "[xyz\]]", "[\^xyz]", "[xy\-z]" and "[xyz\\]".
>  ...
>  For '-' you can also make it the first or last character: "[-xyz]",
>  "[^-xyz]" or "[xyz-]".  For '\' you can also let it be followed by
>  any character that's not in "^]-\bertn".
>
> I think that last sentence should be:
>
>     For '\' you can also let it be followed by any character that's
> not in "^]-\bertndoxuU".

I'll correct that.  Thanks.

> Unless there is some reason to exclude the translation codes:
>
> \d123 decimal number of character
> \o40 octal number of character up to 0377
> \x20 hexadecimal number of character up to 0xff
> \u20AC hex. number of multibyte character up to 0xffff
> \U1234 hex. number of multibyte character up to 0xffffffff

--
The software said it requires Windows 95 or better, so I installed Linux.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php