morhetz / gruvbox

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

Transparent background, cursor_column background and selection background options #287

Open Dave-Elec opened 5 years ago

Dave-Elec commented 5 years ago

Added transparent background which can be set by

let g:gruvbox_transparent_bg=1

Added cursor_column background option which can be set by

let g:gruvbox_cursor_column=<color_name>

Added selection background option which can be set by

let g:gruvbox_selection_bg=<color_name>
bavarianbidi commented 4 years ago

@morhetz could you please take a look?

i'm using this branch a while to get the transparent background and from my point of view, it looks good! thank you @Dave-Elec

areisrosa commented 4 years ago

Working perfectly for me now! Thanks @Dave-Elec

Dave-Elec commented 4 years ago

Thanks, Glad it helped.

funnydman commented 4 years ago

So, are you going to merge it?

HawkinsT commented 4 years ago

This is a great idea, although unfortunately this fails for me in both nvim-qt and gvim in windows (background becomes a solid colour dictated by background value).

polyzen commented 4 years ago

You may want to submit this PR to https://github.com/gruvbox-community/gruvbox

vnpavanelli commented 4 years ago

Thanks, @Dave-Elec ! This worked for me in nvim. Using nvim-gtk or gnvim both this and the command on https://github.com/morhetz/gruvbox/issues/96 don't work.

saragiotto commented 4 years ago

When this background is activated, some color's change on airline/tabline.

Screen Shot 2020-06-22 at 11 32 13

Screen Shot 2020-06-22 at 11 35 29

Dave-Elec commented 4 years ago

@saragiotto Try putting colorscheme gruvbox after gruvbox settings.

Sorry, I don't use gruvbox anymore (currently using gruvbox-material) so I can't test it.

kalkayan commented 3 years ago

I also had the same issue with g:gruvbox_transparent_bg this works fine in Mac's terminal (first screenshot) but creates problems in item (second screenshot)

Screenshot 2021-05-17 at 5 48 59 PM Screenshot 2021-05-17 at 5 51 32 PM

I answered this on stack over flow - https://stackoverflow.com/a/67569365/14526555. copy-pasting from there.

    " Workaround for creating transparent bg
    autocmd SourcePost * highlight Normal     ctermbg=NONE guibg=NONE
            \ |    highlight LineNr     ctermbg=NONE guibg=NONE
            \ |    highlight SignColumn ctermbg=NONE guibg=NONE

People on internet has similar thing with VimEnter instead of SourcePost. VimEnter solves this problem partially and creates prblem when we source again (therefore SourcePost)

Final Results on iterm

Screenshot 2021-05-17 at 5 56 02 PM

see this - https://github.com/kalkayan/dotfiles for more info.

clint911 commented 2 years ago

Totally worked for making gruvbox transparent " Workaround for creating transparent bg autocmd SourcePost * highlight Normal ctermbg=NONE guibg=NONE \ | highlight LineNr ctermbg=NONE guibg=NONE \ | highlight SignColumn ctermbg=NONE guibg=NONE