Search code examples
vimrxvt

Solarized colorscheme for vim and incorrect background color


I use urxvt with the Solarized light color palette. My .Xresources file is properly configured according to these instructions. I also use Vim as my main editor. I've installed the Solarized colorscheme for Vim and modified my .vimrc file according to these instructions. I like the light background color, so I put the following lines in .vimrc

syntax enable
set background=light
colorscheme solarized

However, Vim set the background color to dark. Then I edited the second line, wrote set background=dark and vim changed the background color to light.

The problem is that set background=light gives me the dark background and set background=dark gives me the light background. Why this weird behavior? How to fix this problem? Ah, if I leave out the set background line, everything looks fine (the background is light). I've also noticed that gvim sets the correct background color.


Solution

  • Well, I found what's going wrong. The official (?) Solarized for X Windows is broken when using light colors. There's a discussion here and here. The color scheme didn't adjust to the value of background. I solved the problem using the config from seletskiy configuration.