altercation / solarized

precision color scheme for multiple applications (terminal, vim, etc.) with both dark/light modes
http://ethanschoonover.com/solarized
MIT License
15.77k stars 3.52k forks source link

solarized has different background color whether in terminal or MacVim #138

Open kevinburke opened 13 years ago

kevinburke commented 13 years ago

Any idea why the background is showing up in the terminal as brown? I don't have any has('gui_running') conditionals in my .vimrc.

Here's a screenshot: https://skitch.com/kburke/fc3sd/2-vim

The left screen is with background set to dark, in the Terminal. The bottom right is with background set to light. The top right is MacVim and has the correct background color.

Kevin

cdlm commented 13 years ago

Looks you're getting the 16-color palette in a terminal that does not have the correct colors set. It's a known hitch, feel free to peruse the few closed issues here that discuss it.

In short, either change your iTerm profile to work in 256 color mode (e.g. setting terminal type to xterm-256color), or load & pick the solarized color theme.

kevinburke commented 13 years ago

kevinburke-macbookpro:2 kevinburke$ env | grep term TERM=xterm-256color kevinburke-macbookpro:2 kevinburke$ vi file.txt

and it's back into brown mode - I'm not sure what's going on.

norm2782 commented 12 years ago

Same for me:

λ .vim → λ git master* → echo $TERM xterm-256color

iTerm2 Report Terminal Type also says xterm-256color

These are my vim settings:

syntax enable let g:solarized_termcolors = 256 set background=dark colorscheme solarized

norm2782 commented 12 years ago

A fix:

syntax enable set background=dark colorscheme solarized

Note the missing solarized_termcolors line.

rogeriopvl commented 12 years ago

I wonder if anyone got this working without using solarized in iterm2?

I have exactly the same problem. I have the correct syntax highlight but the background is brown.

NewAlexandria commented 10 years ago

I made a patch to my fork to handle the MacVim problem. I also incorporated code from @codehugger and asked him for a pull request.

I found these things solve the problem here.