Tweaked the indent_guides#cterm_highlight_colors() function a bit

This commit is contained in:
Nate Kane 2010-12-29 20:17:34 +10:00
parent 9b43f5c84c
commit 046104c2f0

View File

@ -87,17 +87,17 @@ function! indent_guides#highlight_colors()
endfunction endfunction
" "
" Automagically calculates and defines the indent highlight colors for " Defines the indent highlight colors for terminal vim.
" terminal vim. "
" NOTE: This function contains no magic at the moment, it will simply use some
" light or dark preset colors depending on the `set background=` value.
" "
function! indent_guides#cterm_highlight_colors() function! indent_guides#cterm_highlight_colors()
if &g:background == 'dark' let l:colors = (&g:background == 'dark') ?
exe 'hi IndentGuidesEven ctermbg=darkgrey' \ ['darkgrey', 'black'] : ['lightgrey', 'white']
exe 'hi IndentGuidesOdd ctermbg=black'
else exe 'hi IndentGuidesEven ctermbg=' . l:colors[0]
exe 'hi IndentGuidesEven ctermbg=lightgrey' exe 'hi IndentGuidesOdd ctermbg=' . l:colors[1]
exe 'hi IndentGuidesOdd ctermbg=white'
endif
endfunction endfunction
" "