jnurmine / Zenburn

Zenburn is a low-contrast color scheme for Vim.
http://kippura.org/zenburnpage
891 stars 149 forks source link

Option to set ctermbg for Normal to none #3

Closed vpetkov closed 12 years ago

vpetkov commented 12 years ago

If it's used with a terminal with zenburn colors and/or transparent background vim's background is in the way.

Signed-off-by: Vesselin Petkov mail@vpetkov.com

jnurmine commented 12 years ago

Hi, could you please add a description of the new config "g:zenburn_terminalBackground" to the beginning of the file where the "g:zenburn*" are described?

vpetkov commented 12 years ago

Yes, thank you. I must have forgot to do that.

Anyway, I have been using hi Normal ctermbg=none for a while and I can't help but noticing that not just the background is off. My terminal has Zenburn colors and it seams that the colors in vim change as I set hi Normal ctermbg=none. And they change to the terminal's colorscheme. I didn't notice this until the other day when I changed my terminal colors.
Do you have any idea why is that? Shouldn't just the background color disappear?

jnurmine commented 12 years ago

Hi vpetkov, I see it too - tried it with xterm and gnome-terminal with TERM=xterm-256color.

There's discussion in Vim's ":help hi-normal-cterm": when setting ctermbg for Normal group, the background option will also change, and that change causes highlight groups to change. And it'll also reload the colorscheme, which might reset all colors. I experimented a bit with removing hi clear and syntax reset from Zenburn itself, to avoid reset, but the behaviour was unchanged.

When I do: hi Normal ctermbg=none the Zenburn colours stay. When I do hi Normal ctermbg=black, the colours are mostly reset.

So without knowing any better for certain, I'd guess it's some Vim internal thing and interaction with the colorscheme. Don't know how to fix it.

vpetkov commented 12 years ago

Yeah. I played with it a bit too. And it seems to me more like a bug. And I guess if it's never set, if ctermbg is never set for Normal group it might work. It's holiday the next four days here so I'll check up on this later next week.

Thanks for you response, really.