2

Ubuntu 12.04.5 LTS 64bits using bash

I would like to change the color of the comments (Dark blue) for nano and pico

I can change the color of pretty much every files and folders in /home/.dircolors but I cannot find how to change the comments into an existing file.

Thank you!

3
  • are you using gnome-terminal ? if yes i can help
    – Alex Jones
    Nov 20, 2014 at 20:51
  • if you are not using gnome-terminal, find the configuration file of that particular terminal(do a search on web). for gnome-terminal its in ~/.gconf/apps/gnome-terminal/profiles/Default, file- %gconf.xml
    – Alex Jones
    Nov 20, 2014 at 21:02
  • I found a new method for your question. are you still interested to know ?
    – Alex Jones
    Dec 9, 2014 at 10:17

2 Answers 2

3

Go to the /usr/share/nano directory and check out the *.nanorc files there. For example, to change the comment color in PHP, edit /usr/share/nano/php.nanorc and change:

## comments
color brightblue "//.*"
color brightblue start="/\*" end="\*/"

to

## comments
color brightgreen "//.*"
color brightgreen start="/\*" end="\*/"

...which is much less invisible when using PuTTY.

This information could also be entered into a ~/.nanorc file for an individual user.

0

Open Gnome termial. Remember what is the color of comment you want to change. then Edit > Profile Preference, then goto the "Color" tab. at the bottom you will see color pallete. then find the color your kept in mind, then change it by clicking and setting it to whatever you want.
Done, its simple !

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .