2

Nano Syntax Highlighting

I stumbleupon an old post on gentoo forums , it’s dated 2003 but it doesn’t seem to be dead. I ‘ve never thinked about the fact that nano doesn’t provide a syntax highlighting and this actually means that I’ve never read the documentation.

Nano without highlighting

nonanosyntax

Nano with syntax highlighting

nanosyntax

A gentoo user (ryszardzonk) has bizipped all the tips and tricks of this thread, lucky me…basically :

1. place *.nanorc files in /usr/share/nano directory
2.
A - place nanorc in /etc to use it globaly for all users
or B - place nanorc as .nanorc for everyuser you intend to use it with
3. enjoy :)
4. mail upgraded or additional syntaxes to vojcek [a t ] tlen [dot ] pl

About point 2: don’t do both cause you’ll probably get Segmentation Fault from nano , in gentoo nano comes with /etc/nanorc already (at least with common FLAGS), you can simply overwrite it.

Original File : Here

Mirrored here ( 11 March 2007 ) : nanosyntax

Here’s the list of the syntax highlights you will get:

apache2.nanorc
asm.nanorc
c.nanorc
changelog.nanorc
changelogs.nanorc
clike.nanorc
config.nanorc
config2.nanorc
config3.nanorc
configfiles.nanorc
conky.nanorc
css.nanorc
default.nanorc
delphi.nanorc
desc.nanorc
dotemacs.nanorc
dummy.nanorc
ekghistory.nanorc
etc-stuff.nanorc
etcxml.nanorc
gentoo.nanorc
groff.nanorc
html.nanorc
info.nanorc
initng.nanorc
initscript.nanorc
java.nanorc
js.nanorc
log-stuff.nanorc
maincf.nanorc
man.nanorc
mimetype.nanorc
mutt.nanorc
named.nanorc
nanorc.nanorc
nscd.nanorc
others.nanorc
passwd.nanorc
patch.nanorc
perl.nanorc
php.nanorc
php2.nanorc
po.nanorc
pov.nanorc
profile.nanorc
python.nanorc
rcfiles-new.nanorc
rcfiles.nanorc
rsync.nanorc
ruby.nanorc
sh.nanorc
shlike.nanorc
tab.nanorc
tex.nanorc
urls.nanorc
vhost.nanorc
xdefaults.nanorc
xml.nanorc
xorg.nanorc

As you can see it’s quite complete , Have fun :D

2 Responses to “Nano Syntax Highlighting”

  1. dumle Says:

    thx! =) needed some tweaking though, dark blue on black background.. =F

  2. teh.geeko/sphere.org » Pimp my server (bashrc, screenrc, nanorc tuning) Says:

    [...] Dateien und ein paar andere Sachen konfiguriert. Die nötigen Dateien dazu findet Ihr im blog di Gas. Die *.nanorc Dateien gehören dann in /usr/share/nano. Weil man ja nicht perfekt ist und einem [...]

Leave a Reply