Search code examples
syntax-highlightingvim

How to change font color for comments in Vim


I'd like to change the default font color for comments, which is dark blue to slightly yellow color. It is difficult to read on the black background. I'm using xfce4-terminal, not gvim with GUI.

How do I change only this one color?

So far, I have changed the settings in my ~/.profile file according to "256 colors in vim" using:

if [ -e /usr/share/terminfo/x/xterm-256color ]; then
        export TERM='xterm-256color'
else
        export TERM='xterm-color'
fi

and

set t_Co=256

in ~/.vimrc.


Solution

  • :hi Comment guifg=#ABCDEF
    

    Pick your color! If using a color terminal, replace guifg=#ABCDEF with ctermfg=N with N being a color number.

    Also type :help :hi for more information.