Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am connecting through putty and i am using vim editor in putty and writing program in perl. I dont have any particular vimrc file.

My problem is that in vim comments are rendered in DARK BLUE on BLACK BACKGROUND.

How to change that comments into some light color in vim or change some settings in putty?

share|improve this question
up vote 6 down vote accepted

you can either

  • play around with
:set background=dark
:set background=light
  • or use another colorscheme:
:colorscheme tab
  • or change the coloring for a 'comment' in your current colorscheme with
:highlight Comment

(this shows you the current settings, change it via

:highlight Comment guibg=white

or to whatever color you want.

share|improve this answer
How can I save these settings? – Dean Rather Apr 20 '12 at 0:55
@Dean: store them in your .vimrc, read more about it – akira Apr 20 '12 at 6:01

You can say the following in vim:

:set background=dark

This will set the syntax highlighting to bright colours. The opposite will set it to dark colours:

:set background=light
share|improve this answer

Instead of (or in addition to) changing the colors in vim (as suggested in the other answers), you can also configure PuTTY to use colors that are easier to distinguish. PuTTY's color settings are under "Window/Colours". You probably want to change "ANSI blue" and "ANSI blue bold" to be lighter/brighter.

The advantage is that this will affect display in all programs that use color (such as ls --color or grep --color) and for all systems you log into.

share|improve this answer
That is best option. +1 Thanks. – Jorge Campos May 23 at 18:36

See /usr/share/vim/vim61/colors/README.txt where /usr/share/vim/vim61/ is your vim directory. /usr/share/vim/vim61/colors/ holds all themes and configures the highlighting colors used.

share|improve this answer

You can try to edit the c.vim / cpp.vim file There is a variety of statement like:

  hi Comment       gui=NONE guifg=#0000ff

just change #0000ff to e.g. #999999 (a slightly dark gray)

share|improve this answer

You must log in to answer this question.

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