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

Airline theme breaks with transparent vim windows. #108

Open
ry-dgel opened this issue Mar 6, 2016 · 6 comments
Open

Airline theme breaks with transparent vim windows. #108

ry-dgel opened this issue Mar 6, 2016 · 6 comments
Milestone

Comments

@ry-dgel
Copy link

ry-dgel commented Mar 6, 2016

I'm using Urxvt with real transparency and Compton as a compositor. In order to get a transparent background with nvim I set, :hi Normal ctermbg=none in init.vim.

This causes a bunch of red to take over in vim-airline, as it gets the colors from the theme after the previous change is made. Without changing my init.vim, if I create a new window and then pass the previous statement as a command, everything works fine, as vim-airline has already read the right colors.

Before.
2016-03-05-221500_931x43_scrot

After. (Statement in config.)
2016-03-05-221433_923x40_scrot

How it should look. (Statement passed as command in existing window.)
2016-03-05-221518_925x41_scrot

@ry-dgel
Copy link
Author

ry-dgel commented Apr 30, 2016

I found a work around for now, by changing the background using a vim autocmd, the change only takes effect after everything loads.

autocmd VimEnter * hi Normal ctermbg=none

Does this perfectly.

@alpertuna
Copy link

alpertuna commented Sep 14, 2016

@ry-dgel I experienced similar problem and your solution works well, thanks 🎉

@3ximus
Copy link

3ximus commented Nov 25, 2020

I was having this issue either with @ry-dgel autocmd Solution and without.
I'm running let g:gruvbox_termcolors = 16 and I guess this setshighlight Normal ctermfg=15 ctermbg=0 and when reversed in the airline theme it uses the bold version of this color (8) for the mode foreground resulting in these:

print_003
print_001

So for me the solution was to define a different color for the background, like so:
hi Normal ctermbg=236
This will make the bold color be 236 too and now works fine.
print_004

@normen
Copy link

normen commented Nov 3, 2021

I am having the same issue when enabling transparency. The autocmd solution works somewhat but when I open a :term it reverts back to the old behavior of displaying wrong colors.

@3ximus
Copy link

3ximus commented Nov 4, 2021

@normen Do you by any chance use the terminal for fzf only ? That was my case and for that I added an option to fzf.vim plugin to prevent it from using the terminal when available

@normen
Copy link

normen commented Nov 5, 2021

No, I am using a zsh with only a few options. I moved from airline to lightline and that seemed to fix the issue, plus some others 😄

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

No branches or pull requests

5 participants