Saturday, August 25, 2012

Re: Vim perl highlighting doesn't understand UTF-8? (vimRE needs perlRE enhancing)

Benjamin R. Haskell wrote:
>> While I've found Vim's RE difficult to memorize all of it's special
>> cases, I didn't know it was also incompatible with it's default text
>> mode.
----
That is what I am stating.

you point out \w \h below, but the character classes [:alpha:] and
all of them don't work with the default charset of UTF-8.

The char I used in my identifier is of class [:alpha:] in unicode.
It's not in Vim. Ergo -- it's RE engine isn't compatible with
it's default charset which is UTF-8.

As annoying as it sounds, is there something wrong with the logic
that uses Unicode compatibility to measure the compatibility of the
RE engine to the default charset which is Unicode? It may be a bit
harsh, but not likely more than warranted. How many of the Unicode
classes and properties work in any language other than English?

>
> As explained above, it's not the case that the RE-engine won't support
> what Perl needs. It's just that the way the Perl syntax is written
> that prevents it from working for Unicode.
----
There's alot of work that's gone into the perlRE to make in unicode
compatible and it wasn't trivial and has had constant maintenance done
on it as Unicode has grown. I find it hard to believe that you or
others working on vim would have the time to make that work within
the structure of vim's existing RE and have time for much of anything
else, and I'm sure there are better ways to spend your time than trying
to kludge in Unicode ranges to the existing engine -- certainly the task
you state below should be alot higher on the list than any kludge...
But that's my opinion...I think it would be a waste of time -- i'd much
rather see work go forward to allow a choice like grep has, of 'RE's...

>
> I've wanted the ability to swap out RE engines for a while, too. This
> might be something I attempt to tackle at some point. (Probably in
> queue behind switching out the input-processing layer to support more
> key sequences in terminal-vim.)
>

--
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: