macosvimterminalcolorsansi-colors

Can't import colors to terminal.app in OS X Yosemite (solarized for terminal vim)


I've been struggling with this for hours today and it's really driving me crazy. I just installed mathiasbynens dotfiles and I am trying to get my terminal vim to use the solarized color theme (that comes with the dotfiles). Macvim works fine, but terminal vim uses the ansi color palette. From the solarized home page:

If you are going to use Solarized in Terminal mode (i.e. not in a GUI version like gvim or macvim), please please please consider setting your terminal emulator’s colorscheme to used the Solarized palette. I’ve included palettes for some popular terminal emulator as well as Xdefaults in the official Solarized download available from Solarized homepage. If you use Solarized without these colors, Solarized will need to be told to degrade its colorscheme to a set compatible with the limited 256 terminal palette (whereas by using the terminal’s 16 ansi color values, you can set the correct, specific values for the Solarized palette).

I have imported the osx-terminal.app-colors-solarized from the solarized download (both the xterm-256color version and the ansi version. They change some things in the terminal (like color for text, bold text, marking and pointer) but they don't change the ansi colors themselves that are used by vim (blue, red etc...).

Shouldn't they do this? Am I doing something wrong?

In the files on the github page for the terminal.app solarized colors it looks like they should change ansi colors. For example:

<key>brightYellowColour</key>
<data>
BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
ZmZmg1MTpj6DeHnQPoPQg+A+AYY=
</data>

Someone please help me understand this. What is the difference between xterm-256color and ansi? Can the ansi colors become any color (looks like it in the terminal settings)? Why would you then even need xterm-256color?

I am very thankful for any answers.


Solution

  • Well, this terminal theme seems to have solved it. It changed the ansi colors as expected. Strange though that he refers to the main solarize download:

    If you have come across this colorscheme via the OS X Terminal.app repository on github, see the link above to the Solarized homepage or visit the main Solarized repository.

    since that one doesn't work.