Here is updated list of nanorc with script to compile them to one file for Powerful Nano Syntax Highlighting. Clone the Git repo and get highlighted. Nano is not exactly a powerful text editor, vi is definitely the powerful text editor (we have basic guide on vi), but for the beginners and the purposes where vi may be not required, Nano can do the work nicely.
Nano Syntax Highlighting : OS X Specific
OS X, even Yosemite’s Nano is old version. That will not take any Syntax Highlighting. Here is specific guide for OS X Nano Syntax Highlighting. There is a trick – upgrade Nano by building from source code.
Nano Syntax Highlighting : Linux Server Specific
Servers on SSH will not take Syntax Highlighting, unless you are configuring that Linux Server’s Nano in the same way like local computer.
---
See the screenshot in full size!
Nano Syntax Highlighting : nanorc
For Nano Syntax Highlighting, you’ll need various nanorc files; specific to the language. What basically people does, they add each file and repeatedly add the line to include the nanorc file. That is not required. I have a Github repo and it is continuously updated to suck the nanorc
from the whole World. Here is the Github Repo which has all the possibly commonly needed nanorc for Nano Syntax Highlighting.
You need not to know anything. You will run these commands :
1 2 3 | cd ~ && git clone https://github.com/AbhishekGhosh/nano–syntax–highlighting–iNano–.git cd nano–syntax* && sudo make install–global TEXT=white nano ~/.nanorc |
In that newly opened file, only add this line :
1 | include “/usr/local/share/nano/ALL.nanorc” |
Nginx conf files also gets Syntax Highlighted!
Nano Syntax Highlighting : How to Contribute?
If you want to add more files, clone the repo :
1 2 | cd ~ && git clone https://github.com/AbhishekGhosh/nano–syntax–highlighting–iNano–.git cd nano–syntax–highlighting–iNano– |
Add your nanorc
file(s), which I do not have yet. chmod
all the files to 777 and send a pull request with a note which file is changed. Please test your material on your computer before sending the pull request.