PATCH: catch some more common regexps and if/unless expressions
Gavin Sinclair
gsinclair at soyabean.com.au
Thu Sep 18 15:07:46 EDT 2003
On Thursday, September 18, 2003, 1:30:26 PM, Doug wrote:
>> 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\)\)
Yes, it is. Perhaps not by much, but I think it's hard to argue for
their equivalence.
If your point is that I have no idea what either of them mean, then
you are perfectly correct!
Gavin
More information about the vim-ruby-devel
mailing list