On 06/08/10 21:44, Bee wrote:
searching for Mac non-breaking space
*[:blank:]* [:blank:] space and tab characters
*[:space:]* [:space:] whitespace characters
I have asked on vim-use and opinion is [:space:] will find more than
[:blank:]
On MacOS the non-breaking space is not found by either.
Search for /\%xA0 finds the Mac non-breaking space.
Can I add the Mac the non-breaking space to [:space:] ?
Or do I need to do something like:
[[:space:]\xA0]\+
-Bill
Well, apparently the no-break space is not regarded as part of the POSIX
[:space:] collection. So you could do [[:space:]\xA0], or insert a true
no-break space (by Ctrl-V x A0 without the intervening spaces, or by
Ctrl-K <Space> <Space>, meaning "hit Ctrl-K then press the spacebar
twice") between either the two opening or the two closing brackets. The
latter (with a true no-break space) is less readable but it can be used
regardless of what 'cpoptions' or 'compatible' are set to.
The fact that 0xA0 is a no-break space has nothing to do with Mac OS X,
or Mac OS 9, or with the Macintosh in general; it is part of the
definition of ISO-8859-1 aka Latin1 (and in Unicode, codepoint U+00A0 is
the no-break space too, because the codepoints U+0000 to U+00FF have
intentionally been borrowed from Latin1).
Best regards,
Tony.
--
It is illegal to take more than three sips of beer at a time while standing.
[real standing law in Texas, United States of America]
--
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