2

I'm using the spf-13 VIM setup 1. I'm a bit confused about the colorschemes. It seems they just source the files which call :hi set color commands, and since not all colors are set in all colorschemes, the colors you actually get depend on what order you invoke the colorschemes.

This is my default colorscheme upon launch. .vimrc claims that it is solarized and :colo also claims that it is solarized.

on starting vim

Yet its not really completely solarized. The background color is different. I actually quite like the background color. The even/odd white tabs are unusable though.

Set it now:

:colorscheme solarized

now the background is blue

:colorscheme django

set it to something else

:colorscheme solarized

resolarized

So now it has inherited certain settings from the django colorscheme.

I added this to my ~/.vimrc.local trying to just hack the colorscheme after startup

hi IndentGuidesOdd ctermbg=235
hi IndentGuidesEven ctermbg=236

but these are just over-written later. Is it csapprox doing this ?

Also csapprox is leaving colorscheme files in my working directories. I have "django" and "solarized" files in my project directories.

Honestly I'm not sure if I need csapprox, maybe these schemes would work without it. But with spf-13 its still tricky to figure out how to correctly remove bundles.

1 https://github.com/spf13/spf13-vim

suci
  • 178
  • 7
Chris Sattinger
  • 4,446
  • 3
  • 30
  • 29
  • Start by dropping that SPF13 POS *and* CSApprox. Then use a simple `~/.vimrc`, place your colorschemes in their standard location (`~/.vim/colors`), make sure your colorschemes are designed for 256-colors terminals *and* that your `$TERM` is set to either `screen-256color` or `xterm-256color`. – romainl Feb 25 '13 at 13:40

2 Answers2

2

Colorschemes should have both :hi clear and :syntax reset at the top; that clears the previous scheme's definitions and should avoid inheriting anything from the previous one.

You benefit from CSApprox if the colorscheme does not provide high-color definitions; have a look at the scheme's documentation, or check whether it includes any cterm=NNN definitions.

I think CSApprox supports dynamic colorscheme changes, but haven't personally tried this; I stick with one colorscheme all the time. You could give a try to manually converting the colorscheme(s) once with the :CSApproxSnapshot command; then, you don't need the plugin at all during runtime.

Finally, Vim "distributions" like spf-13 lure you with a quick install and out of the box settings, but you pay the price with increased complexity (you need to understand both Vim's runtime loading scheme and the arbitrary conventions of the distribution) and inflexibility (the distribution may make some things easier, but other things very difficult).

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • Yes, there's a lot of weirdness going on here. solarized does :hi clear correctly. Even if I set the tab colors manually, when I open another buffer something goes and resets them. I tried :CSApproxSnapshot and a status message flashed that some colors may be incorrect and then the background was set to white. SPF-13 is useful so far to get introduced to things, but I am running into lots of problems indeed. – Chris Sattinger Feb 26 '13 at 13:14
1

Its https://github.com/nathanaelkane/vim-indent-guides that is creating the white column coloring. Its doing this anytime a new buffer is opened.

At the moment Terminal Vim only has basic support. This means is that colors won't be automatically calculated based on your colorscheme.

So its not csapprox doing it.

Chris Sattinger
  • 4,446
  • 3
  • 30
  • 29