How to activate or enable color themes in bash scripts or other languages in Nano editor

Bored of looking at that black and white text for a while? You would want to enable or activate color themes in Nano editor which is really easy to do.

There are many languages supported for color theming within nano, such as

  • C/C++
  • PHP
  • Ruby
  • SH
  • CSS
  • Man
  • Perl
  • Python
  • TCL
  • HTML

etc

First you will want to open nanorc file with the command shown

Then you would want to find include file that holds theming information such as one shown below

Mostly what you have to do is to uncomment this line so above will become this

You can edit this file too, open one of the file in edit mode with nano

You will get something like this

 

 

You can change above mentioned colors to your taste for different things such as keywords, strings etc. icolor is case in-sensitve matching for the provided pattern.

For more information on nanorc files, you should check out this link

http://www.nano-editor.org/dist/v2.1/nano.html#Nanorc-Files

I activated colors for bash scripts, Text within my bash scripts under nano looks like this now

nano

I hope that this article will be helpful to you. leave your comments if you would like to share any additional information.

Cheers

 

 

 

VN:R_U [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:R_U [1.9.22_1171]
Rating: 0 (from 0 votes)

Leave a Reply