beginner: set Comment color

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

beginner: set Comment color

fkater@googlemail.com

Hi,

I've opened a C file. When I do

:hi Comment ctermfg=darkgreen

it works and the comments are displayed in darkgreen color. When I
though edit my .vimrc file to just these two lines:

syntax on
hi Comment ctermbg=black ctermfg=darkgreen

then no colors are changed (the comments are blue).
What's wrong here?

(I aim to use no syntax highlighting except for comments and strings.)

Felix

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


Reply | Threaded
Open this post in threaded view
|

Re: beginner: set Comment color

Dave Land

Felix,

> I've opened a C file. When I do
>
> :hi Comment ctermfg=darkgreen
>
> it works and the comments are displayed in darkgreen color. When I
> though edit my .vimrc file to just these two lines:
>
> syntax on
> hi Comment ctermbg=black ctermfg=darkgreen
>
> then no colors are changed (the comments are blue).
> What's wrong here?

Might the syntax coloring for the file that you opened in the second
scenario (with those two lines in your .vimrc) overrode the settings
in .vimrc?

If you want to go entirely without syntax coloring, wouldn't you have
to move the syntax files to somewhere vim couldn't read them?

Dave


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---