fxn / vim-monochrome

Monochrome color scheme for Vim
315 stars 59 forks source link

Setting guibg and ctermbg to default_bg messes up transparency #10

Closed jafarlihi closed 5 years ago

jafarlihi commented 5 years ago

Some people use window compositors (like compton) and put "hi Normal guibg=NONE ctermbg=NONE" into their .vimrc to achieve transparency (this is not just for aesthetics, it lets you read what's behind the terminal – which can be quite useful).

Here's what it looks like with the default colorscheme: default-colorscheme

Here's how the current vim-monochrome behaves: default-monochrome

This can be quite trivially fixed by extending the guibg/ctermbg if condition in the hi function like so:

if bg != s:default_lst && bg != s:default_bg
    call add(cmd, 'guibg='.bg[0])
    call add(cmd, 'ctermbg='.bg[1])
endif

Here's the patched vim-monochrome: fixed-monochrome

I don't see what's the point of setting guibg/ctermbg to default_bg which is black, when "set background=dark" is already there in the top of the file.

If I'm not missing anything here then give me a go-ahead and I'll send in a patch.

jafarlihi commented 5 years ago

Pull request #11