Jens Segers on

OSX Nano Syntax Highlighting

Wait, nano has syntax highlighting? Why did I not know this?


To get it, you will need to install a newer nano version (2.4.2 at the time of writing) using brew:

> brew tap homebrew/dupes
> brew install nano

Syntax highlighting is not enabled by default, and can be turned on by including profiles in your ~/.nanorc file. You can choose to only enable highlighting for specific languages:

include /usr/local/share/nano/html.nanorc
include /usr/local/share/nano/php.nanorc

Or enable them all, which is what I did:

include /usr/local/share/nano/*.nanorc

Hope you find this as useful as I did, enjoy!


Tweet about this blog post and you will appear below!