Tweaked the indent_guides#cterm_highlight_colors() function a bit
This commit is contained in:
parent
9b43f5c84c
commit
046104c2f0
@ -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
|
||||||
|
|
||||||
"
|
"
|
||||||
|
Loading…
Reference in New Issue
Block a user