Syntax highlighting for Nano on Mac OS X
Friday, July 22nd, 2011 04:12 pm GMT +2
Nano is one of my favorite text editors, for a couple of reasons
- It’s very simple (as campared to Vim, which I was not able to quickly grasp on)
- It’s available by default on almost any *nix distro out there
- It has syntax highlighting (always turned off by default for some reason)
It this post I’ll show you how to install latest Nano to your Mac OS X environment with syntax highlighting turned on for most of programming&markup languages.
For managing my OSX packages I’m using brew, but unfortunately it does not have nano formula yet. Built-in version of nano is pretty outdated (2.0.6), and there is no binaries available exclusively for mac. So we’re going to do a classic configure-make-install dance.
Step1. Download nano sources
wget http://www.nano-editor.org/dist/v2.2/nano-2.2.6.tar.gz
Step2. Download syntax highlighting configs for nano
wget http://webapp.org.ua/wp-content/uploads/2011/07/nanorc.tar
These are compiled from different sources over the internet with some small mods made by myself.
Step3. Compile & install
tar -xvvf nano-2.2.6.tar.gz
cd nano-2.2.6
sudo ./configure --prefix=/usr/
sudo make install
cd /
sudo tar -xvvf nanorc.tar
At this point you’re done. Latest nano with syntax highlighting will be installed at your system paths.