Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

5 Answers 5

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 vimdoc.sourceforge.net/htmldoc/usr_05.html –  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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.