Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background switching in terminal Vim #4

Open
noahfrederick opened this issue Apr 25, 2012 · 4 comments
Open

Background switching in terminal Vim #4

noahfrederick opened this issue Apr 25, 2012 · 4 comments

Comments

@noahfrederick
Copy link
Owner

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.

@andrzejsliwa
Copy link

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

@khughitt
Copy link

khughitt commented Feb 8, 2015

Same issue here. Causes a problem with the limelight.vim plugin:
junegunn/limelight.vim#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.

@noahfrederick
Copy link
Owner Author

@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.

@khughitt
Copy link

khughitt commented Feb 8, 2015

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants