Trying to edit certain files using nano? Looking for better syntax highlighting? Been advised that you can clone a github repo and ‘just’ install it? Not sure how to proceed? Read on.
The GNU nano text editor is installed on a staggering number of Unix-based systems. It’s light and friendly. It’s also smart enough to highlight the syntax in a wide array of different types of files. This makes life easy. We like easy.
Unfortunately, developing your own syntax files is not easy. So we search the web looking for an easy way to give us more syntax highlighting options. Maybe you came across this article on Linux Magazine like I did?
If you find the syntax highlighting functionality in the nano text editor lacking, you will appreciate a collection of .nanorc files in the nanorc GitHub repository.
Here, you’ll find a selection of definition files for a broad range of programming languages: from Python and HTML, to Lua and Markdown. To add all this goodness to nano, clone the GitHub repository using the git clone https://github.com/nanorc/nanorc.git command, and then install the files by running the make install command. That’s all there is to it.
Some comments were: