Skip to content

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

Open
kevinburke opened this Issue Aug 1, 2011 · 6 comments

5 participants

@kevinburke

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
cdlm commented Aug 2, 2011

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

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
norm2782 commented Jan 4, 2012

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
norm2782 commented Jan 4, 2012

A fix:

syntax enable
set background=dark
colorscheme solarized

Note the missing solarized_termcolors line.

@rogeriopvl

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.

@MadPitman MadPitman referenced this issue in altercation/vim-colors-solarized Dec 18, 2012
Open

[vim] fix g:solarized_termtrans #57

@NewAlexandria

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.