If you do any source code tweaking in nano you will no that colourising (or ‘colorizing’ for our American cousins) the code makes life simpler. For some reason the default Fedora config for nano, since approxiamtely the dawn of time, is to disable automatic code highlighting.
Fortunately it is easy to fix this by modifying the /etc/nanorc file. Just edit the file using nano:
su -c 'nano /etc/nanorc'
skip down to the bottom of the file and you will see a whole series options like this:
## 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"
Just remove the octothorpe (a.k.a. hash) from the from the beginning of the line for all types of files you want colourised. e.g. to enable colourising Perl code, you would change the Perl line to this:
## Perl include "/usr/share/nano/perl.nanorc"
Next time you open a Perl script it will be colourised.
Post a Comment