change comment colors in vim

Syntax coloring in vim is pretty awesome. Comments however are by default blue. A color that is hard to read if you have a black background on a LCD screen.

It turns out that this pretty easy to change. For perl you would simply do:


mkdir -p ~/.vim/after/syntax/
echo highlight perlComment ctermfg=DarkGreen guifg=DarkGreen >> ~/.vim/after/syntax/perl.vim

This worked right away after adopting the C example of the documentation. I am sure that php etc will work similar.

Leave a Reply

You must be logged in to post a comment.