Solarized colorscheme for vim and incorrect background color
Asked Answered
D

1

6

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.

Disadvantaged answered 2/7, 2014 at 20:3 Comment(5)
your configured terminal has solarized light color too?Garrek
Yes, I use urxvt with the Solarized light color palette.Disadvantaged
my terminal is urxvt too. I had used solarized colorscheme (dark) for about 1 day, then used a customized scheme. You could try my old config: add these two lines in your vimrc (before colorscheme cmd) , and try: let g:solarized_termcolors = 256 and let g:solarized_termtrans = 1 if it worked, I post it as answer.Garrek
I put these two lines in vimrc and the colors don't look nice anymore. The problem is that set background=light gives me the dark background and set background=dark gives me the light background.Disadvantaged
By the way, gvim sets the correct background color.Disadvantaged
D
3

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.

Disadvantaged answered 3/7, 2014 at 11:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.