[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] nano 1.3.12pre1 is out
From: |
John M. Gabriele |
Subject: |
Re: [Nano-devel] nano 1.3.12pre1 is out |
Date: |
Tue, 6 Jun 2006 18:36:08 -0700 (PDT) |
--- "John M. Gabriele" <address@hidden> wrote:
>
> [snip]
>
> And in the ~/.nanorc, at the end of the description of how
> syntax files work (but before the one about regexes), it
> should say:
>
> ## The name of the syntax file (without the ".nanorc" extension)
> ## should be the same as the "short description" name inside that
> ## file. These names are kept fairly short to make them easier to
> ## remember and faster to type using nano's -Y option.
>
> Actually, you might consider just having the code (or the build
> tools) ensure that those two names are always identical...
Gah. I totally forgot that it might be nice to have some syntax
files that aggregate a number of patterns into them. In that case,
the comment above might start off with this extra bit:
## Unless otherwise noted,
and an aggregated syntax file might look something like this:
----------------------- snip etc.nanorc ---------------------------
## Commonly-encountered files in the /etc directory.
##
syntax "crontab" "crontab$"
color brightgreen "\<(SHELL|PATH)\>"
color brightyellow "[*=]"
color brightgreen ":"
color brightblue "#.*"
syntax "fstab" "fstab$"
color green "\<(proc|defaults|auto|noauto|ro|rw|user)\>"
color yellow "(/[a-zA-Z0-9_]+\>)+" "/"
color brightblue "#.*"
syntax "inittab" "inittab$"
color brightgreen ":"
color brightblue "#.*"
syntax "sources_list" "sources\.list"
color brightgreen "^deb(-src)?"
color brightyellow "\<(stable(/updates)?)|main|testing)\>"
color brightblue "#.*"
syntax "passwd" "passwd$"
color brightgreen ":"
syntax "services" "services$"
color brightblue "#.*"
## Possibly useful new syntax:
syntax "^nsswitch\.conf$" uses "services"
## For thes files, use the services syntax patterns until
## someone comes up with a better, customized, one:
syntax "modules\.conf$" uses "services"
syntax "protocols$" uses "services"
syntax "printcap" "printcap$"
color brightgreen "(:|\|)"
color brightblue "#.*"
syntax "mysqld" "my\.cnf$"
color brightcyan "^\[[^]]*\]"
color yellow "^[a-zA-Z0-9_-]+\>"
color brightgreen "="
color brightblue "#.*"
syntax "xserver" "XF86Config-4$"
color brightcyan "(End)?(Sub)?Section"
color yellow ""[^"]*""
color brightblue "#.*"
# We already have a set named "sh", so let's reuse it
# for a few more files and save the user from having to
# type "-Y sh".
syntax "\.bashrc$" uses "sh"
syntax "\.bash_profile$" uses "sh"
syntax "\.profile$" uses "sh"
syntax "profile$" uses "sh"
syntax "updatedb.conf$" uses "sh"
----------------------- /snip etc.nanorc ---------------------------
It seems like having that new "uses" keyword in the syntax files
might be useful for saving some typing. Also, that last bunch of
syntax lines might instead go into the sh.nanorc...
---John
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
- [Nano-devel] nano 1.3.12pre1 is out, David Lawrence Ramsey, 2006/06/06
- Re: [Nano-devel] nano 1.3.12pre1 is out, Jordi Mallach, 2006/06/06
- Re: [Nano-devel] nano 1.3.12pre1 is out, Benno Schulenberg, 2006/06/06
- Re: [Nano-devel] nano 1.3.12pre1 is out, John M. Gabriele, 2006/06/06
- Re: [Nano-devel] nano 1.3.12pre1 is out,
John M. Gabriele <=
- Re: [Nano-devel] nano 1.3.12pre1 is out, Mike Frysinger, 2006/06/07
- Re: [Nano-devel] nano 1.3.12pre1 is out, David Lawrence Ramsey, 2006/06/07
- Re: [Nano-devel] nano 1.3.12pre1 is out, John M. Gabriele, 2006/06/08
- Re: [Nano-devel] nano 1.3.12pre1 is out, David Lawrence Ramsey, 2006/06/08
- Re: [Nano-devel] nano 1.3.12pre1 is out, John M. Gabriele, 2006/06/08
Re: [Nano-devel] nano 1.3.12pre1 is out, Mike Frysinger, 2006/06/07