Could you please add a '\p' operand to regex's (cf. '\v'), to invoke standard perl pattern matching.
I've tried vi's syntax, but it has too many gotcha's and not as much power, whereas, perl's pattern matching is considered 'best of breed' -- check references on wikipedia (or other general regex references). Wikipedia talks about different types of regex's: the standard, POSIX, "Extended", and "Perl" -- with Perl being 'best of breed'.
Here's what wikipedia says @ http://en.wikipedia.org/wiki/Regular_expression#Perl-derived_regular_expressions
Perl-derived regular expressions
Perl has a more consistent and richer syntax than the POSIX basic (BRE) and extended (ERE) regular expression standards. An example of its consistency is that
\always escapes a non-alphanumeric character. Other examples of functionality possible with Perl but not POSIX-compliant regular expressions is the concept of lazy quantification (see the next section), possessive quantifies to control backtracking, named capture groups, and recursive patterns.
Due largely to its expressive power, many other utilities and programming languages have adopted syntax similar to Perl's — for example, Java, JavaScript, PCRE, Python, Ruby, Microsoft's .NET Framework, and the W3C's XML Schema all use regular expression syntax similar to Perl's. Some languages and tools such as Boost and PHP support multiple regular expression flavors. Perl-derivative regular expression implementations are not identical, and all implement no more than a subset of Perl's features, usually those of Perl 5.0, released in 1994. With Perl 5.10, this process has come full circle with Perl incorporating syntactic extensions originally developed in Python and PCRE.
Even the standard util, 'grep', now has "-P' support for Perl syntax.
Sadly, I waste hours of time trying to find the way to do it in vim and end up frustrated. I don't use it anywhere near as often (it's usually faster to get out of vim, and write a script!, that's how bad it is!)... It's not as well documented and it has more exceptions, and non-standard syntax. I'm not asking
for an incompatible replacement, but only support for an option of using the top standard...
You can see people asking for this at least 6 years ago:
http://tech.groups.yahoo.com/group/vim/message/75081
Another from 2008
http://tech.groups.yahoo.com/group/vim/message/95477
Saw one from me from 2 years ago...am sure I asked about it before that, but
can't find a ref.... oh well.
So far, neither of the 2 big things I've asked for over the years have managed to get into vim...something along the lines of the above (but I didn't have references to backup what I was saying (as if that ever **really** matters...) at that point)... and UTF-8 support on Windows by calling it's 'uniscribe' font display routine rather than some 8-bit variant.
Thanks
Linda
No comments:
Post a Comment