mirror of
https://github.com/Yggdroot/indentLine.git
synced 2025-12-06 12:14:25 +08:00
Add background color (ctermbg, guibg)
This commit is contained in:
@@ -26,12 +26,16 @@ Or you can customize conceal color by:
|
||||
" Vim
|
||||
let g:indentLine_color_term = 239
|
||||
|
||||
"GVim
|
||||
" GVim
|
||||
let g:indentLine_color_gui = '#A4E57E'
|
||||
|
||||
" none X terminal
|
||||
let g:indentLine_color_tty_light = 7 " (default: 4)
|
||||
let g:indentLine_color_dark = 1 " (default: 2)
|
||||
|
||||
" Background (Vim, GVim)
|
||||
let g:indentLine_bgcolor_term = 202
|
||||
let g:indentLine_bgcolor_gui = '#FF5F00'
|
||||
```
|
||||
|
||||
**Change Indent Char**
|
||||
|
||||
@@ -44,6 +44,12 @@ function! s:InitColor()
|
||||
let term_color = g:indentLine_color_term
|
||||
endif
|
||||
|
||||
if !exists("g:indentLine_bgcolor_term")
|
||||
let term_bgcolor = "NONE"
|
||||
else
|
||||
let term_bgcolor = g:indentLine_bgcolor_term
|
||||
endif
|
||||
|
||||
if !exists("g:indentLine_color_gui")
|
||||
if &background ==# "light"
|
||||
let gui_color = "Grey70"
|
||||
@@ -54,8 +60,14 @@ function! s:InitColor()
|
||||
let gui_color = g:indentLine_color_gui
|
||||
endif
|
||||
|
||||
execute "highlight Conceal cterm=NONE ctermfg=" . term_color . " ctermbg=NONE"
|
||||
execute "highlight Conceal gui=NONE guifg=" . gui_color . " guibg=NONE"
|
||||
if !exists("g:indentLine_bgcolor_gui")
|
||||
let gui_bgcolor = "NONE"
|
||||
else
|
||||
let gui_bgcolor = g:indentLine_bgcolor_gui
|
||||
endif
|
||||
|
||||
execute "highlight Conceal cterm=NONE ctermfg=" . term_color . " ctermbg=" . term_bgcolor
|
||||
execute "highlight Conceal gui=NONE guifg=" . gui_color . " guibg=" . gui_bgcolor
|
||||
|
||||
if &term ==# "linux"
|
||||
if &background ==# "light"
|
||||
|
||||
@@ -47,11 +47,19 @@ g:indentLine_color_term *g:indentLine_color_term*
|
||||
Specify terminal vim indent line color.
|
||||
e.g. let g:indentLine_color_term = 239
|
||||
|
||||
g:indentLine_bgcolor_term *g:indentLine_bgcolor_term*
|
||||
Specify terminal vim indent line background color.
|
||||
e.g. let g:indentLine_color_term = 202
|
||||
|
||||
|
||||
g:indentLine_color_gui *g:indentLine_color_gui*
|
||||
Specify GUI vim indent line color.
|
||||
e.g. let g:indentLine_color_gui = '#A4E57E'
|
||||
|
||||
g:indentLine_bgcolor_gui *g:indentLine_bgcolor_gui*
|
||||
Specify GUI vim indent line background color.
|
||||
e.g. let g:indentLine_color_gui = '#FF5F00'
|
||||
|
||||
g:indentLine_color_tty_light *g:indentLine_color_tty_light*
|
||||
Specify none X terminal vim indent line color in bg light.
|
||||
default: 4
|
||||
|
||||
Reference in New Issue
Block a user