vim-indent-guides icon indicating copy to clipboard operation
vim-indent-guides copied to clipboard

Cannot figure out how to set custom indent-hilight colours for Solarized.vim

Open ELLIOTTCABLE opened this issue 14 years ago • 1 comments
trafficstars

I, like @jc00ke (see #24) am trying to use @altercation’s 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:

let g:indent_guides_auto_colors = 0
" . . .
function! s:RebuildSolarization()
   " . . . <setting up Solarized colour values here>
   exe "hi! IndentGuidesOdd" .s:fmt_none   .s:fg_none   .s:bg_base02
   exe "hi! IndentGuidesEven".s:fmt_none   .s:fg_none   .s:bg_base01
   " . . . <other Solarized customization>
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._

ELLIOTTCABLE avatar Nov 10 '11 22:11 ELLIOTTCABLE

Any chance this is still an issue?

c.f. #76

alerque avatar Feb 21 '23 18:02 alerque