I am experimenting with creating a statusline
and have opted for coloring different parts of it.
The problem is that while the item's foreground color is changed, the background is black and doensn't match the statusline
, e.g.:
set statusline+=%([%1*%t%*]%)
How can I set the item's background color to match the statusline
(or turn it "transparent")?
set filetype=vim
set laststatus=2
set showcmd
set showmode
set termguicolors
" %-0{minwid}.{maxwid}{item}
" :help gui-colors
hi User1 guifg=Green guibg=fg
hi User2 guifg=Purple guibg=fg
hi User3 guifg=Cyan guibg=fg
hi User4 guifg=Red guibg=fg
hi User5 guifg=Orange guibg=fg
set statusline=%([%f]%)
set statusline+=%(%m%r%w%h%)
set statusline+=%(%y%)
set statusline=
set statusline+=%([%1*%t%*]%)
set statusline+=%5*%(%m%r%w%h%)%*
set statusline+=%(%y[%{&expandtab?'S':'T'}]%)
set statusline+=%=%<%([%3*%l,%c%V%*]%)
set statusline+=%([%3*%P%*]%)
"set statusline+=%([%3*%l,%c%*]%)
set statusline+=%(%a%)