Can nano do syntax highlighting like gedit and vim? How can I enable it? I need at least bash and python syntax highlights.
|
The nano editor provides syntax highlighting for a few languages and scripts by itself. Check out
Link them to your user's nano configuration file present at
Now, syntax highlighting is enabled in nano for whatever file you linked (You could also link multiple files)
Note: Sometimes you might get a There are also other solutions if you are not satisfied with your bash highlighting. One example of such can be found here |
|||||||||||
|
|
Yes you can, however the default syntax definitions are quite poor and incomplete. I'm maintaining a more accurate set of definitions here, for anyone who finds them useful. |
|||
|
|
|
Yes, it does seem possible. Here's a guide that explains how to enable syntax highlighting: http://tuxarena.blogspot.com/2009/04/how-to-enable-syntax-highlighting-in.html. It took me a few seconds to google "syntax highlighting nano" and that popped right up. I'd recommend trying to search for your question before asking it, as you will probably get a quicker response time. On a side note, I highly recommend taking the plunge and learning Vim (or emacs, if that suits you better.) It will only take 20 or 30 minutes to learn the basic functionality you get out of nano, and you can learn about additional features and plugins at whatever pace you want to. |
|||||||||
|
