Page 1 of 1

Handy syntax highlighting for nano

Posted: 17. Nov 2016, 06:00
by Sasquatch
I came across this git a little while ago and thought it might appeal to others as well. I haven't checked out all the formats yet so I don't know if they all work as advertised or if they follow any accepted style guidelines. But the few I have checked certainly make it easier for me to parse nano at a glance.

The install instructions per the thread where I found the git;

Code: Select all

git clone https://github.com/nanorc/nanorc.git
cd nanorc
make install
*EDIT*
Forgot to add the bit about including the new rcs into the nanorc. This is all in the README, but it still seems proper to include it here.
Add these lines to the ~/.nanorc

Code: Select all

include ~/.nano/syntax/html.nanorc
include ~/.nano/syntax/css.nanorc
include ~/.nano/syntax/php.nanorc
include ~/.nano/syntax/ALL.nanorc
So you can add as few or as many as you need. I just added ALL.nanorc to get everything. At least, I hope that's what that means.

Re: Handy syntax highlighting for nano

Posted: 8. May 2017, 12:27
by Papasot
Nice to see nano (the must-have simple and fast editor) with syntax highlighting. Personally, I use Emacs as an IDE, and I don't think nano will ever replace it for that purpose. Nevertheless, it's still nice to have such a functionality on nano.

Thank you for sharing this.