[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] ruby pats
From: |
John M. Gabriele |
Subject: |
Re: [Nano-devel] ruby pats |
Date: |
Fri, 7 Jul 2006 01:14:06 -0700 (PDT) |
--- David Lawrence Ramsey <address@hidden> wrote:
> John M. Gabriele wrote:
> > Just noticed that the end part of camelCaseNames were accidentally
> > getting highlighted as Constants. So, I changed the Constants pattern
> > as follows:
>
> <snip>
>
> >> color brightblue "\<(\$|@|@@)?[A-Z]+[0-9A-Z_a-z]*"
> >
> > and it seems to be ok, except now, for Constants that start with $, @,
> > or @@, those little symbols are (incorrectly) no longer getting
> > highlighted as part of the constant... not great, but possibly better
> > than before.
> >
> > It seems like the symbols ($, @, @@) should be getting colored using
> > that regex. Why aren't they?
>
> After some experimenting, this appears to work properly (please let me
> know if it doesn't; I'll add it to CVS if it does):
>
> color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
>
> My best guess as to why is that "\<" marks the beginning of a word, and
> punctuation isn't treated as part of the word, so the "\<" has to be
> after the punctuation.
Gah. I see -- should've tried that. Works great. Thanks David. :)
---John
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com