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.
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-macbookpro:2 kevinburke$ env | grep term
kevinburke-macbookpro:2 kevinburke$ vi file.txt
and it's back into brown mode - I'm not sure what's going on.
Same for me:
λ .vim → λ git master* → echo $TERM
iTerm2 Report Terminal Type also says xterm-256color
These are my vim settings:
let g:solarized_termcolors = 256
Note the missing solarized_termcolors line.
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.
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.