3

I've installed Ubuntu,

And they have decided to use blue text for comments in vim, Blue is the worst color to use for text, as human eyes have the least number of receptors for blue, one thing I remember from college.

Is it possible to tell vim never use blue? I don't want to install a new color theme or anything, because I like the syntax coloring they have for every thing, I can even see correct syntax in Apache's httpd.conf

So I need a simple change, blue to gray or something.

3 Answers 3

7

Append this line to your ~/.vimrc file:

hi Comment ctermfg=DarkRed

You can find the list of available colornames in the help section: :help cterm-colors.

1

Reconfigure your terminal instead. Under Edit → Profile Preferences → Colors, you can edit the palette used.

Note however that this only works for 16-color mode. In 256-color mode, such a task is impossible, since neither Vim nor the terminal have any way of knowing which colors are to be considered "blue" or "not blue" or in-between...

3
  • Thanks, but I'm sshing into the server it's not an xwindow
    – user893730
    Commented Mar 4, 2012 at 3:32
  • @user893730, that means its more like the 16-color mode @grawity has mentioned. You've to tweak the terminal emulator preferences. Which could be : Settings for gnome-terminal or konsole or putty (if you ssh from windows) or xterm/rxvt/aterm (these, by setting colors resources in .Xdefaults file) and many more.
    – Anil
    Commented Mar 4, 2012 at 6:18
  • @Anil: 256-color mode is not related to X11 or SSH at all. It is a terminal emulator function, available on all platforms (for example, PuTTY on Windows). Commented Mar 4, 2012 at 10:37
0

Type :highlight to see a list of all colors and then change the ones that are blue with highlight NAME ctermfg=COLOR (put it in ~/.vimrc). For graphical vim you would use highlight NAME guifg=COLOR instead.

You must log in to answer this question.

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