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

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.
{"cc_re__cc_re__cc_by_sa_3_0": ["                  <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2015 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2015.3.26.2411\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Super User works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </noscrip"], "copyright__copyright__copyright": ["s/ holds all themes and configures the highlighting colors used.\n\nshare|improve this answer\n\nYou can try to edit the c.vim / cpp.vim file There is a variety of statement like:\n\n  hi Comment       gui=NONE guifg=#0000ff\n\njust change #0000ff to e.g. #999999 (a slightly dark gray)\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}