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
-
cd ~
-
nano .nanorc
then write into it
-
include "/usr/share/nano/tex.nanorc"
-
include "/usr/share/nano/perl.nanorc"
-
include "/usr/share/nano/python.nanorc"
-
include "/usr/share/nano/html.nanorc"
-
include "/usr/share/nano/ruby.nanorc"
-
include "/usr/share/nano/nanorc.nanorc"
-
include "/usr/share/nano/java.nanorc"
-
include "/usr/share/nano/patch.nanorc"
-
include "/usr/share/nano/man.nanorc"
-
include "/usr/share/nano/c.nanorc"
-
include "/usr/share/nano/sh.nanorc"
if you want another language to highlight just check the directory
-
ls /usr/share/nano/
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