[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: colors in gvim



On Fri, Mar 09, 2001 at 06:37:04PM -0800, Eric G. Miller wrote:
| On Fri, Mar 09, 2001 at 05:47:45PM -0500, Marcelo Chiapparini wrote:
| > Dear debianers
| > 
| > I am using the  vim-gtk plus vim-rt packages. Although I was able to
| > change the font using by gvim, I don't 
| > know how change the background and foreground colors. I think that it is a
| > matter of put 
| > something in /etc/gvimrc, like I done for the fonts. I looked in the man
| > pages and on-line help, but I didn't 
| > find anything. Any help will be very appreciated.
| > Regards,
| 
| You may want something like:
| 
| " set bgcolor to light, so colors are readable
| set background=light
| 
| The alternative is "dark".

This only sets the tint/shade (I don't know the proper "art" term).
If you use a black terminal and run vim, you want "set bg=dark" to
make the colors lighter.  If you use "set bg=light" the colors will
be so dark (against the black) that it will be almost impossible to
use.  Vice versa for a light background (gvim's default of white).

The solution is to change the colors used by the syntax highlighting
for "Normal" text.  In my .gvimrc I use:

highlight Normal guibg=black guifg=grey90

to get a black background and text that is grey90 (not quite a glaring
white).  I also use "set bg=dark" to make the highlighting readable.
See ":help highlight" for more info on how this actually works (or
just ask ;-)). 

Also, there is a cl option "--rv" or "--reverse-video" to reverse the
colors from their normal.  gvim will actually check to make sure that
it is light-on-dark rather than just blindly switching fg & bg.

HTH,
-D



Reply to: