nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] ruby syntax highlighting patterns


From: John M. Gabriele
Subject: Re: [Nano-devel] ruby syntax highlighting patterns
Date: Sat, 20 May 2006 16:57:22 -0700 (PDT)

--- Jordi Mallach <address@hidden> wrote:

> On Sat, May 20, 2006 at 03:10:05PM -0700, John M. Gabriele wrote:
> > I found some Ruby syntax highlighting patterns in the ruby-talk archives:
> > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/93305
> 
> Interesting. Google gave me this when looking for more:
> http://gentoo-wiki.com/TIP_Nano_Context_Highlighting

Hm. I'd looked there a short while back for Ruby what it wasn't there at the
time. Anyhow, it seems to have a few small differences from the one I posted
here (though still originally from the same source).

> I don't think we have any xorg or ebuild syntax. Question is: do we want
> it, or should we stick in general to programming languages?

I think the situation will be, either

A. put them in the official GNU nano, and have one place where folks can fine
tune them and where they will always be available by default, or else

B. don't put them in the official GNU nano, and folks will have to dig around
on the net for patterns, where they'll find various similar examples, most
containing small differences.

Personally, I think nano becomes more useful with each additional kind of file
it can syntax highlight. As long as it's easy to enable them all (that is,
moving through ~/.nanorc deleting *one* comment symbol for each syntax
pattern's include file would be fine).

Also, since we're now going to possibly have multiple syntax highlighting files
included into the main ~/.nanorc, I think it might make sense to have some kind
of aliasing mechanism so you can have stuff like:

syntax for "my\.cnf"     uses "sh"
syntax for "inittab"     uses "whatever"
syntax for "fstab"       uses "whatever2"
syntax for "syslog.conf" uses "sh"
etc...

inside an etc.nsyn file (not sure what filename extension is being used for
nano syntax highlighting files). That way, folks could automatically get, say,
"sh" pattern highlighting for syslog.conf unless or until another more apt
pattern comes along.

Finally, while we're on the subject, it might be more useful if the names in
the syntax commands (ex. the word "manpage" in "syntax "manpage" "\.[1-9]x?$")
were made purposely simple so that they're easier to type quickly on the
command line (ex. "nano -Y sh some_script_without_a_filename_extension" instead
of the currently-required "nano -Y shellscript
some_script_without_a_filename_extension").

---John


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]