rakr / vim-one

Adaptation of one-light and one-dark colorschemes for Vim
MIT License
1.99k stars 196 forks source link

Neovim requires background to be set first #69

Closed PhilT closed 6 years ago

PhilT commented 6 years ago

I'm not sure if it's just my setup but I get the same result with Neovim in WSL and Dockerised Neovim in Powershell.

If I have the following in my init.vim:

set termguicolors
colorscheme one
set background=dark

Then switch to the light theme the background doesn't change. However if I reload my init.vim then switching works.

However if I set the background first

set termguicolors
set background=dark
colorscheme one

Then switching to the light theme works correctly without needing to reload the config.

This is contrary to the instructions in the README.

wsdjeg commented 6 years ago

switch to the light theme

what do you mean switch to the light theme? what is the step you done? as I know when using vim-one SpaceVim, we alse get some issue with backgroud. it can not works like grubox.

rakr commented 6 years ago

This issue is a known issue with spaceVim, it is related to the fact that Vim has an unexpected behaviour when setting the background. This has been discussed several times, please check the closed issues on this repo.

In order to switch to light and black you just need to type:

: set bg=light

or

:set bg=dark
wsdjeg commented 6 years ago

@rakr I wound why gruvbox works well with spacevim? Maybe there are some differences between how grubox and vim-one set colors.

wsdjeg commented 6 years ago

@PhilT You should create minivimrc without spacevim, I think it can be reproduced without spacevim,

the mini vimrc should be:

set rtp+={path to grubbox}
set rtp+={path to vim-one}
" then do something here
PhilT commented 6 years ago

Appreciate the assistance. I've ditched SpaceVim and gone back to my own config and you've reminded me that I did like the idea of a light and dark theme. Very handy in the summer when you need a bright screen. Not so much at the moment though!

set bg=dark/light works a treat in my own config. Thanks.