Highlighting Nano

If you accessing to remote host and changing some configuration file or anything from console you have to be careful because any mistake can cause a big fault.So that i think when changing configuration file from console two color is not enough.That’s why lets make a colorful nano. First create a “.nanorc” file with


then write into it

  1. span class=”st0″>"/usr/share/nano/tex.nanorc""/usr/share/nano/perl.nanorc""/usr/share/nano/python.nanorc""/usr/share/nano/html.nanorc""/usr/share/nano/ruby.nanorc""/usr/share/nano/nanorc.nanorc""/usr/share/nano/java.nanorc""/usr/share/nano/patch.nanorc""/usr/share/nano/man.nanorc""/usr/share/nano/c.nanorc""/usr/share/nano/sh.nanorc"

if you want another language to highlight just check the directory


if you want more nanosyntax you can download by clicking here
With this pack you can highlight
Emacs,C++,C,Pov-Ray,HTML,XML,TeX,Quoted emails (under e.g. mutt),Patch files,Manpages,Groff,Perl,Python, Ruby, Java, Assembler, Bourne shell scripts, Gentoo ebuilds and such, PHP , Xorg config,URLS, CSS, Conky, .cf, *rc – catches more files, profile, java script, configs, Xstuff, Delphi, ChangeLog , Apache 2, Apache 2 Virtual Host etc.

Another tips about nano you can use auto indentation with using -i parameter 🙂
Have a good one 🙂

Tags: , , , , ,

Thursday, May 14th, 2009 Linux, OS, Tips, Uncategorized