vim-hemisu icon indicating copy to clipboard operation
vim-hemisu copied to clipboard

Background switching in terminal Vim

Open noahfrederick opened this issue 12 years ago • 4 comments

Switching the background in e.g., MacVim via :set background=light correctly reloads the color scheme and assigns the light-variant colors, and likewise for dark. However, doing the same in the terminal (Terminal.app in my case) produces odd results. The background color is not set and some colors appear that do not correspond to any colors assigned in the scheme.

I've found that the following workaround works reliably: If you are using the dark mode and want to switch to light, for example, switch to another color scheme, set the background to light, then switch back to Hemisu:

:colorscheme default
:set background=light
:colorscheme hemisu

If anyone with more experience can (a) explain what I'm doing wrong in hemisu.vim or (b) explain why simply setting background doesn't do what I think it should, it would be appreciated.

noahfrederick avatar Apr 25 '12 16:04 noahfrederick

I have exactly same problem and I don't know how to solve it yet

andrzejsliwa avatar Apr 20 '13 21:04 andrzejsliwa

Same issue here. Causes a problem with the limelight.vim plugin: https://github.com/junegunn/limelight.vim/issues/11

I took a quick look at the hemisu code but also didn't notice anything strange. Best bet might be to look at some other colorschemes which behave well and try and see what might be different.

khughitt avatar Feb 08 '15 17:02 khughitt

@khughitt

some other colorschemes which behave well

If you know of one that relies on the value of 'background', please link it here. I suspect that :set background simply does not do what is advertised in the help. I'd like to avoid adding extraneous workarounds (thus going down the same road as Solarized for Vim, which is a convoluted disaster of a color scheme). It's probably best just to split hemisu.vim into hemisu-dark.vim and hemisu-light.vim.

noahfrederick avatar Feb 08 '15 18:02 noahfrederick

I'll let you know if I come across anything. Splitting sounds like a pretty reasonable idea though and might make maintenance simpler. Thanks for the great theme!

khughitt avatar Feb 08 '15 18:02 khughitt