Add some syntax colour to the Nano editor

I do my server managment on headless boxes so Nano is my friend and recently I came across serialhex/nano-highlight on Git which is a nice collection syntax highlighting files. To install these on your box run the following (which puts them in ~/.nano)

$ git clone git:// ~/.nano

Once you have the files intalled all you need to do is create/edit your ~/.nanorc file and include the highlighter you want e.g.

## Markdown
include "~/.nano/markdown.nanorc"  

Or you can just include all of them but rather than doing this line by line you can run the following which loops over all the files in ~/.nano and writes the output to ~/.nano for you.

find ~/.nano -iname "*.nanorc" -exec echo include {} \; >> ~/.nanorc  
comments powered by Disqus