4

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

2
  • 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
    Aug 13, 2015 at 15:23
  • 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
    – Keith Yong
    Aug 18, 2015 at 17:54

1 Answer 1

1
+50

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.

7
  • I have both iterm and vim set to base16-solarized light non-256 on that original picture
    – Keith Yong
    Aug 25, 2015 at 14:05
  • In your last comment you mention that you are using the non-256 itermcolors. However, in your original question you provide a link to the itermcolor-presets you currently use which do have 256 colors. So please make sure you really use the non-256 itermcolors-preset (there are two variants). Besides advising you to better use altercation's vim-colors-solarized plugin I don't know what else you could try.
    – cbaumhardt
    Aug 25, 2015 at 16:04
  • I have tried both base16-iterm-solarizedlight on 256/non-256 variants and that didn't fix the issue for me
    – Keith Yong
    Aug 25, 2015 at 21:29
  • I guess setting let g:solarized_termcolors=16 and let g:solarized_termtrans=1 in your .vimrc will not change something either as those should be the default settings, but you could try that as well. Other than that I am sorry, I have no more ideas :(
    – cbaumhardt
    Aug 25, 2015 at 21:46
  • Thanks for your help :) Since my bounty is ending soon anyway you can have it.
    – Keith Yong
    Aug 26, 2015 at 0:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.