Friday, April 10, 2009

changin color in vim, comments dark blue !

dark blue over black screen is annoying... this is how you can change colors of comments in vim: taken from http://newbiedoc.sourceforge.net/text_editing/vim.html.en#PERSONAL-VIM-COLOR

it is useful also the command :runtime syntax/colortest.vim to see a color test with all the names... (http://linux.derkeiler.com/Mailing-Lists/SuSE/2008-11/msg01212.html)

i changed the color of comments by adding this line at the end of my /etc/vimrc file:

:highlight Comment ctermfg=darkgray


---------------------

You can change the default colors of a syntax highlight by using the highlight command. For example, to change all comments to the color green type:

:highlight Comment ctermfg=green

The second argument to that command is the group name. To make the setting permanent simply add it to your .vimrc.

Note

In order for the color change to work the highlight command should come after the syntax on command in your .vimrc.

To see what group names are available to be changed type:

:help group-name

The available colors can be found by typing:

:help cterm-colors

2 comments:

  1. I absolutely agree the annoyance of dark blue over black screen!! Thanks for your blog post.

    ReplyDelete