Reputation: 29
I have installed Solarized for Vim, as well as for my terminal app, but experience strange background colours. I see the same problems with both iTerm2 on mac running Vim 7.2 on Debian 6, and Putty on win7 running Vim 7.3 on Redhat EL5.9.
Symptoms: The code get the same background as the line numbers. Only strings and reserved words seem to get the correct (lighter) background colour.
Here is an image showing the problem:
And this is how it should look (screenshot from Solarized home page):
Any idea what causes this?
Upvotes: 0
Views: 1345
Reputation: 4213
Issue 130 answers this (perhaps it is you?)
If I use PuTTy with the default settings ( not changing to putty-256color ) then the colors are not correctly allocated.
I noticed this line
elseif g:solarized_termcolors != 256 && &t_Co >= 16
checks to see if
t_Co > = 16
but Putty identifies itself or at least the variable is8
which causes the else statement to run.If I change that statement to:
elseif g:solarized_termcolors != 256 && &t_Co >= 8
then everything works as it should. I don't know how this would affect other terminals but I thought you should know that this is indeed broken and changing that value or adding another conditional would fix this problem.
As a fix in the meantime if anyone has this problem they can simply set t_Co to equal 16 in their vimrc and that appears to fix the problem.
Upvotes: 1
Reputation: 469
Using PuTTY, I had to set the Terminal-type string
(under Connection, Data) to xterm-256color
instead of xterm
.
Upvotes: 1