Nano is an easy to use Linux shell text editor. Here is a very easy to follow tip to get syntax highlighting in Nano.
Enter this in a terminal (for Ubuntu):
And at the end of the file, paste this (or if this already exists in your nanorc file, remove the "#" before each "include" line):
Now close Nano and open the nanorc file again and see the difference:
sudo nano /etc/nanorc
And at the end of the file, paste this (or if this already exists in your nanorc file, remove the "#" before each "include" line):
## Nanorc files
include "/usr/share/nano/nanorc.nanorc"
## C/C++
include "/usr/share/nano/c.nanorc"
## HTML
include "/usr/share/nano/html.nanorc"
## TeX
include "/usr/share/nano/tex.nanorc"
## Quoted emails (under e.g. mutt)
include "/usr/share/nano/mutt.nanorc"
## Patch files
include "/usr/share/nano/patch.nanorc"
## Manpages
include "/usr/share/nano/man.nanorc"
## Groff
include "/usr/share/nano/groff.nanorc"
## Perl
include "/usr/share/nano/perl.nanorc"
## Python
include "/usr/share/nano/python.nanorc"
## Ruby
include "/usr/share/nano/ruby.nanorc"
## Java
include "/usr/share/nano/java.nanorc"
## Assembler
include "/usr/share/nano/asm.nanorc"
## Bourne shell scripts
include "/usr/share/nano/sh.nanorc"
## POV-Ray
include "/usr/share/nano/pov.nanorc"
Now close Nano and open the nanorc file again and see the difference:
nano /etc/nanorc