4
votes

First of all, sorry if this is another one of those vim colors in iTerm2 questions. I have tried everything I could find and still can't solve the issue. iTerm2 just doesn't give the correct colors for me. Here is a screenshot comparing iTerm2 vim to Macvim.

enter image description here

:echo &t_Co gives me 256.

iTerm2 report terminal type is set to xterm-256color. echo $TERM gives xterm-256color.

I am using base16-solarized as my colorscheme. The iTerm2 colorscheme is this, and my vim colorscheme is this.

Here is my vimrc.

Thanks for the help

edit: Here is another comparison, this time using the solarized.vim color from altercation/vim-colors-solarized: enter image description here

edit: Tried with $TERM set to xterm, colors are better but there are still some issues with the buffer airline bar, not sure if this is supposed to be normal

enter image description here

1
The whole point of setting your TERM to xterm-256color is to allow Vim to use colors 16 to 255 of the xterm palette. xterm-256color is pointless — in your situation — because neither Base16 nor Solarized use any color from that palette.romainl
Tried with $TERM set to xterm, colors are better but there are still some issues with the buffer airline bar, not sure if this is supposed to be normalKeith Yong

1 Answers

1
votes

As mentioned on the vim-colors-solarized Github page, to get the correct colors in your terminal emulator you should change the default colors of iTerm2.

To do so simply follow the instructions given here for the base16-solarized.light colorscheme.