Recently I was editing a php file on my VPS and I noticed it had some basic highlighting. The reason why I noticed is because on Mac OS X everything is always in the default terminal color without highlighting.

So I Googled a bit until I came accross some lost gist with a few comments of people trying to enable it. After trying it myself and using it for a day or two I wouldn't want to live without it anymore. It's a very handy little tweak that will definitely boost your productivity as a developer.

Some examples, to convince you, if you haven't been already

A json file in OS X' default nano

A json file with the updated homebrew nano

And here's some javascript and a shell script with the updated nano

Enough showing off, how do I get it?

Turns out it's pretty simple, since you're reading this article I assume you're a developer that knows how homebrew works and probably already has it set up correctly.

It's a pretty straightforward 2 command install. Not much too explain.

# install the latest nano
brew install homebrew/dupes/nano
# include styling into ~/.nanorc
echo "include /usr/local/share/nano/*.nanorc" > ~/.nanorc

That's it, enjoy your fancy nano on OS X! 🍺

Post comment

Avatar