4
votes

I just grabbed the "Ultimate Vim Distribution" (http://vim.spf13.com/) that came with a bunch of colorschemes.

For some reason, setting a colorscheme inside my .vimrc (e.g. "colorscheme corporation") results in completely different colors than the colorscheme actually defines. Moreover, manually entering :colorscheme corporation once vim has loaded a file results in the colors changing to the correct scheme.

Upon loading a file, ":colo" and "echo g:colors_name" both print "corporation", as they should. "t_Co" is set to 256 before the colorscheme is set (if that matters). I'm all out of ideas!!

Thank you!

2
That seems like a GUI only color scheme. Are you sure it sets any cterm colors in it? - Ercan Erden
@Ercan You're right. What does that mean? And what tipped you off? Here is the file: github.com/flazz/vim-colorschemes/blob/master/colors/… - MitchellSalad
Another issue that wouldn't happen if the op didn't use a distribution. - romainl

2 Answers

1
votes

It seems to be a GUI only color scheme. There's not much you can do unless you want to write a terminal version.

When you see a color scheme not behaving as expected you can always try it in GVim with :gui<cr>. If you look at the code it has styling only for GUI. Here's an example line from this scheme:

hi FoldColumn gui=italic guifg=#192224 guibg=#A1A6A8

And here's a line from Molokai which is a color scheme both for the GUI and the terminal versions of Vim:

hi FoldColumn ctermfg=67 ctermbg=16

As you can see the colors aren't RGB values. cterm stands for color term.

1
votes

When the colorscheme only defines colors for GVIM, the GUI version of Vim, you can, if you have a high-color terminal that supports 88 or 256 colors, use the CSApprox plugin to convert (once or automatically during Vim startup) the color definitions for the terminal.