PATCH: catch some more common regexps and if/unless expressions
Doug Kearns
djkea2 at mugca.its.monash.edu.au
Thu Sep 18 14:30:26 EDT 2003
On Thu, Sep 18, 2003 at 10:26:42AM +1000, Gavin Sinclair wrote:
> On Thursday, September 18, 2003, 9:49:36 AM, Doug wrote:
>
> > Regexps after not and then are now matched as are if/unless expressions
> > after '=' and '('.
>
> > This _really_ needs to be generalised...
>
> Those vim regexen are pretty filthy.
Indeed, but I don't really think the lack of 'very magic' is the
problem. :-)
> Given any thought to using the \v modifier?
<snip>
I've never really found it very useful. It makes the simple cases a
little 'neater' but not really any easier to read.
\v$%(deferr|defout|stderr|stdin|stdout)>
$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>
As for the more convoluted cases, is this:
\v\w@<!%(\?%(\\M-\\C-|\\C-\\M-|\\M-\\c|\\c\\M-|\\c|\\C-|\\M-)=%(\\\o{3}|\\x\x{2}|\\=\S))
really any easier to read than this:
\w\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{3}\|\\x\x\{2}\|\\\=\S\)\)
Regards,
Doug
More information about the vim-ruby-devel
mailing list