Hi Emmanuel,
> What about using red instead? The Java style uses this color for the
> strings. That would give:
>
> # Strings
> color brightred ""(\\.|[^"])*"" "'(\\.|[^'])*'"
I'm more a fan of green for strings. Plain green. Brightred makes
it seem as if these strings are _very important. But normally they
are friendly messages to the user. :)
Plain red would work on a light background, but is too dark for a
dark one. But if you want brightred, that's fine with me.
Did you have a look at how vim or emacs colour these files?
It wouldn't be bad to mimic one of them, if one of those
colour styles pleases you. (Hm! It seems that vim adapts
its colour scheme for groovy depending on the background:
on a dark one it uses magenta for strings, on a light one red;
and it changes the colours for all other elements too.)
> # Interpolation
> icolor red "\$\{[^\}]*}"
Yellow for these things was okay, though. The colours to avoid
are brightyellow and brightcyan (because of light backgrounds)
and blue and red (on dark backgrounds).
Oh, btw, why the 'icolor'? There are no letters in the matching
regex, so case insensitivity is irrelevant here.
> It looks like the Wikipedia examples highlight the method names, but I
> don't think we can do that with nano.
One could, if a method is always preceded by a period and followed
by either a space or an opening parenthesis. Afterward one can
then colour all periods and parentheses in some other colour.
(What nano is lacking is the colour "none", to uncolour things
that were coloured by earlier regexes.)
Benno
--
http://www.fastmail.com - mmm... Fastmail...