Tuesday, December 25, 2012

Re: matchpairs and Unicode

On 26/12/12 00:50, KamilS wrote:
>> ' (U+2018 LEFT SINGLE QUOTATION MARK) and either ' (U+2019 RIGHT SINGLE
>>
>> Depending on the language, two characters on each of the above lines may
>> be chosen, and in either order.
>
> I'm afraid my Vim says:
> E474: Invalid argument: matchpairs+=':'
>
> `:' and other ASCII combinations work fine. It is compiled with +multi_byte.
>

Yes, that is expected.

My post was in answer to the question "which multibyte characters do you
need?". As was mentioned earlier in this thread, and is documented under
":help 'matchpairs'", "Currently only single byte character pairs are
allowed, and they must be different." Without +multi-byte, any character
is single-byte but there are only 256 of them at most. With +multi_byte
and 'encoding' set to "utf-8", there are only 128 single-byte characters
(minus 32 control characters) but there are more than one million
characters in all.

The OP answered with only one pair, but I suppose that this is an
all-or-none question: if a possible *future* patch to the Vim C code
allows matching U+201C with U+201D, any other pair of (different)
characters (single-byte or not) in the current 'encoding' would be
acceptable too.


Best regards,
Tony.
--
Haggis, n.:
Haggis is a kind of stuff black pudding eaten by the Scots and
considered by them to be not only a delicacy but fit for human
consumption. The minced heart, liver and lungs of a sheep, calf or
other animal's inner organs are mixed with oatmeal, sealed and boiled
in maw in the sheep's intestinal stomach-bag and ... Excuse me a minute ...

--
You received this message from the "vim_use" 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

No comments: