On Jul 1, 7:27 pm, Axel Kielhorn <v...@axelkielhorn.de> wrote: > Hi! > > I'm using: > > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 4 2012 19:19:42) > MacOS X (unix) version > Included patches: 1-531 > > The default matchpairs are: > matchpair(:),{:},[:] > > I can > :set mps+=<:> > > to add a new matchpair, but I can't > > :set mps+=«:» > or > :set mps+=‹:› > > I get > E474: Invalid argument: mps+=‹:› > > Shouldn't Vim accept any unicode character? > > Axel
It is documented under ":help 'matchpairs'": "Currently only single byte character pairs are allowed, and they must be different". What is or isn't a single-byte character depends on how characters are represented in memory (i.e. the global 'encoding' option), not on disk (the buffer-local 'fileencoding'). If 'encoding' is set to "utf-8", only the 128 lowest codepoints are single-byte, so you can add <:> (0x3C 0x3E) but not «:» (0xAB 0xBB) and not ‹:› (U+2039 U+203A). If 'encoding' is set to Latin1, only the lowest 256 Unicode codepoints can be represented in memory, each as a single byte, so in that case you can add «:» but you cannot even represent ‹:› in memory (in any buffer, since 'encoding' is a global option). Best regards, Tony. -- Economists state their GNP growth projections to the nearest tenth of a percentage point to prove they have a sense of humor. -- Edgar R. Fiedler -- You received this message from the "vim_mac" 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