Handy syntax highlighting for nano

Other talk about Salix
Post Reply
Sasquatch
Posts: 155
Joined: 26. Mar 2014, 00:50

Handy syntax highlighting for nano

Post 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.
User avatar
Papasot
Donor
Posts: 247
Joined: 3. May 2015, 18:37
Location: Patras, Greece

Re: Handy syntax highlighting for nano

Post 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.
A pleasant detail in this forum: several people pick a picture of their pet as their avatar. Who am I to do otherwise? ;-)
Post Reply