gruvbox icon indicating copy to clipboard operation
gruvbox copied to clipboard

Swaping between light and dark background

Open SolidTux opened this issue 5 years ago • 3 comments

With lucius I had keybindings to switch between dark and light background:

nnoremap <Leader>bd :set background=dark<CR>
nnoremap <Leader>bl :set background=light<CR>

Similar commands only work partly with gruvbox as not everything seems to be changed back (e.g. the cursor)

Starting with dark

dark1

Switching to light works

light

But switching back to dark doesn't complete work

dark2

But switching again to light works, only the dark one seems to be somewhat broken here.

SolidTux avatar Mar 21 '20 00:03 SolidTux

You could try https://gitlab.com/polyzen/togglebg.vim which was taken from https://github.com/altercation/vim-colors-solarized. Also mirrored here: https://github.com/polyzen/togglebg.vim

polyzen avatar Mar 21 '20 03:03 polyzen

Sadly, this leads to the same result. And I also just tested what happens when I start with the light background. In that case it's the light background which is broken. So it's always the starting theme that doesn't work when switching back and forth. I'll try again with a minimal configuration and see if that can reproduce it.

SolidTux avatar Mar 21 '20 10:03 SolidTux

It does appear with the following configuration

call plug#begin('~/.local/share/nvim/plugged')
Plug 'morhetz/gruvbox'
call plug#end()

set background=dark
colorscheme gruvbox
nnoremap <Leader>bd :set background=dark<CR>
nnoremap <Leader>bl :set background=light<CR>

but only with nvim-gtk, so I'm not sure, where the problem lies as lucius works fine here :man_shrugging:

SolidTux avatar Mar 21 '20 11:03 SolidTux