Taner Şenyurt

Kişisel gelişim sitesi…

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

  1. cd ~
  2. nano .nanorc

then write into it

  1. include "/usr/share/nano/tex.nanorc"
  2. include "/usr/share/nano/perl.nanorc"
  3. include "/usr/share/nano/python.nanorc"
  4. include "/usr/share/nano/html.nanorc"
  5. include "/usr/share/nano/ruby.nanorc"
  6. include "/usr/share/nano/nanorc.nanorc"
  7. include "/usr/share/nano/java.nanorc"
  8. include "/usr/share/nano/patch.nanorc"
  9. include "/usr/share/nano/man.nanorc"
  10. include "/usr/share/nano/c.nanorc"
  11. include "/usr/share/nano/sh.nanorc"

if you want another language to highlight just check the directory

  1. 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 :)

posted under Linux, OS, Tips, Uncategorized

Comments are closed.