morhetz / gruvbox

Retro groove color scheme for Vim
13.87k stars 1.11k forks source link

Support changing background #135

Open docwhat opened 8 years ago

docwhat commented 8 years ago

I prefer my background to be #000000. You rejected #102 saying:

I would try to provide alternative solution to overload any gruvbox color

I would like this feature.

Using the workaround (mentioned in #74) "works" but is fragile; switching colorscheme or changing background causes the change to be lost:

colorscheme gruvbox
highlight Normal guibg=0 ctermbg=0

It would be nice to have "official" support for this.

kascote commented 8 years ago

@morhetz, yes please... add a feature to tweak the colors, I prefer too a darker background that the one by default.

AlessandroYorba commented 8 years ago

@docwhat @kascote #74 Here's a solution to tweak a colorscheme without the strange cornercases when switching to another colorscheme.

colorscheme gruvbox
if g:colors_name == "gruvbox"
highlight Normal ctermbg=16 guibg=#000000
"List other overrides here
endif
namedots commented 8 years ago

I sometimes want to use guibg=NONE, and perhaps it has to do with my $TERM value but the last set background persists when un-setting Normal's guibg. The way I'm dealing with it for the moment is with the following modification in gruvbox:

" Vanilla colorscheme ---------------------------------------------------------
" General UI: {{{

" Normal text
call s:HL('Normal', s:fg1, s:none)
"                             ^ changed to none

And then setting the colorscheme with

silent! colorscheme gruvbox

to suppress a bunch of E420's