From 6cd4526bc3ea958ac84a3032153f9166c4ef0cc7 Mon Sep 17 00:00:00 2001 From: NagatoPain Date: Tue, 18 Dec 2012 19:00:38 +0800 Subject: [PATCH] add options to specify indent lines color --- after/plugin/indentLine.vim | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/after/plugin/indentLine.vim b/after/plugin/indentLine.vim index 44de08a..83fa189 100644 --- a/after/plugin/indentLine.vim +++ b/after/plugin/indentLine.vim @@ -13,17 +13,27 @@ if !exists("g:indentLine_char") " | ┆ │ let g:indentLine_char = "┆" endif +if !exists("g:indentLine_color_term") + if &bg =~? "light" + let g:indentLine_color_term = 235 + else + let g:indentLine_color_term = 039 + endif +endif +if !exists("g:indentLine_color_gui") + if &bg =~? "light" + let g:indentLine_color_gui = "Grey" + else + let g:indentLine_color_gui = "Grey40" + endif +endif set conceallevel=1 set concealcursor=inc function! InitColor() - if &bg == 'light' - " ctermfg= 039, 234 - hi Conceal ctermfg=039 ctermbg=NONE guifg=Grey guibg=NONE - else - hi Conceal ctermfg=235 ctermbg=NONE guifg=Grey40 guibg=NONE - endif + exec "hi Conceal ctermfg=" . g:indentLine_color_term . " ctermbg=NONE cterm=bold" . + \ " guifg=" . g:indentLine_color_gui . " guibg=NONE" endfunction function! SetIndentLine()