preservim / vim-indent-guides

A Vim plugin for visually displaying indent levels in code
MIT License
2.62k stars 161 forks source link

highlight colors not recognized with solarized #24

Open jc00ke opened 12 years ago

jc00ke commented 12 years ago

I use @altercation's solarized (dark) for my theme, and I can't get the highlights to be dark when background is set before colorscheme.

set background=dark
colorscheme solarized

yields

solarized light

where

colorscheme solarized
set background=dark

yields

solarized dark

I've tried setting

hi IndentGuidesEven ctermbg=black
hi IndentGuidesOdd ctermbg=darkgrey

but that doesn't work at all. You can see the relevant lines to my .vimrc here

nathanaelkane commented 12 years ago

What OS and version of Vim are you using?

As a temporary work-around, try adding the following to your .vimrc:

let g:indent_guides_auto_colors = 0
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd  ctermbg=black
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=darkgrey
jc00ke commented 12 years ago

7.3.35 on Ubuntu 11.04

Your temporary workaround worked.

vunhan commented 6 years ago
let g:indent_guides_auto_colors = 0
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd  ctermbg=darkgrey
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=lightgrey

This works for solarized light theme