Change font color for comments in vim

I would like to change the default font color for comments, which is dark blue to slightly yellow. Hard to read on a black background. Could you advise me how to change only one color? I am pleased with the other colors.

I am using xfce4-terminal (not gvim with GUI).

So far I have made the settings in the ~/.profile file according to this link as follows

 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

Thank you

+61
vim syntax-highlighting
Apr 29 2018-11-11T00:
source share
6 answers
 :hi Comment guifg=#ABCDEF 

Choose your color! If you are using a color terminal, replace guifg=#ABCDEF with ctermfg=N so that N is the color number.

Also type :help :hi for more information.

+34
Apr 29 2018-11-11T00: 00Z
source share

The most well-observed color schemes will match the background setting:

 set background=dark 

change the color of comments from blue to cyan when using the default color.

+85
May 23 '11 at 16:29
source share
 hi Comment ctermfg=LightBlue 

Add this to your .vimrc file, which is located in the ~ or /etc/vim directory. This will make it permanent. I have not tested this with gvim.

I also have set background=light before setting the comment color. I like all the colors he created, except for the comments.

+37
Nov 20 '13 at 12:35
source share

syntax highlighting in vim

set background = dark

or

set bg = dark

The best solution for VIM users!

+3
Oct 02 '12 at 16:17
source share

After a short search, you can find a decent link to vim, especially to this question, to http://vim.wikia.com/wiki/256_colors_in_vim . A nice place to start, but through: be: verbose hi when actually inside vim and editing the file. Then check how all the variables have metadata associated with them. The data returned from there makes it easy to add the desired types of modifiers to .vimrc. For example, these are updates that I recently added in order to get rid of blue, and I do not need to torment light blue, as a result:

  set number background=dark syntax on highlight Comment ctermfg=119 highlight Identifier ctermfg=99AA00 
+3
Mar 01 '14 at 20:16
source share

If the goal is to make it more readable in the background of the texto console flashlight, the command below has proved that I am a great option and easiser to remember:

 :colorscheme evening 

But be careful, this will change the colors of other elements.

+2
Aug 31 '14 at 2:00
source share



All Articles