nathanaelkane/vim-indent-guides — Issue #29: Cannot figure out how to set custom indent-hilight colours for Solarized.vim
Author: elliottcable
Created: 2011-11-10 22:33:05+00:00
State: open

I, like @jc00ke (see #24) am trying to use @altercation’s [Solarized](http://ethanschoonover.com/solarized) with `vim-indent-guides`. My approach is slightly different, as I desire to set specific colours for the indent guides (and I intend to tweak some other distasteful Solarized defaults at the same time). I’ve copied the configuration from your README into a function, and setup an auto command to call this function (as I intend to add other Solarized modifications to it than those I’m making for your plugin), as thus:

```vim
let g:indent_guides_auto_colors = 0
" . . .
function! s:RebuildSolarization()
" . . .
exe "hi! IndentGuidesOdd" .s:fmt_none .s:fg_none .s:bg_base02
exe "hi! IndentGuidesEven".s:fmt_none .s:fg_none .s:bg_base01
" . . .
endfunction

autocmd! VimEnter,ColorScheme * if g:colors_name == "solarized" | call s:RebuildSolarization() | endif
```

Unfortunately, it doesn’t work: while the commands are run (I’ve checked them with `echoerr` at the time of the function being run), by the time anything is rendered, the hilights are set back to bog-standard neon-green and neon-red. (Very disgusting defaults, by the way; couldn’t you at least default to two quiet shades of grey? :x)

I’m not very familiar with VimScript, what am I doing wrong here?

***Postscript**: The full code at the time of this writing is available in the commit linked below.*