Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to have a transparent Vim session within the xfce-4 terminal?

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

I made mine transparent in gnome-terminal (and I'm guessing this will work for xfce-4 too)

I'm using Molokai theme (the 256 colour version).

I just had to change one line.

(original):

hi Normal          ctermfg=252 ctermbg=233

(my version, with transparent background):

hi Normal          ctermfg=252 ctermbg=none
share|improve this answer
    
Juanjo's answer is great, and inspired me to add this edit: hi NonText ctermfg=250 ctermbg=none This ensures that the parts of buffers that don't have content, are transparent. –  duma Dec 23 '12 at 20:20
    
Note that you can just add this line to your .vimrc and it will have the same effect: hi Normal guibg=NONE ctermbg=NONE. And it won't change the forgroud color for the Normal group either. –  Aziz Light Feb 9 at 21:19
add comment

In the Terminal Preferences dialog, the Appearance tab has a "Transparent background" option to make the window transparent. If you found this option and set it appropriately, I can think of two reasons that it might not be working for you:

1) You might be using gvim instead of console vim within the terminal. If Vim opens up a new window, then you're using gvim instead of console vim.

2) You might have a vim colorscheme that explicitly sets white or black as the background color. It's unusual to have a misbehaving color scheme like this, so I don't think it's likely.

I think it's most likely that you're actually using gvim instead of console vim.

share|improve this answer
    
Thanks for the answer, but I've figured it out: the vim coloscheme had ctermbg set to "black", I've removed it and now the background is transparent. I'm definitely using vim. –  tomislav-maric Mar 8 '12 at 9:47
    
So my answer was right, then, wasn't it? I suggested it might be a colorscheme that explicitly sets the background to black or white, which indeed turned out to be the problem. –  amcnabb Mar 13 '12 at 18:14
    
sorry for accepting your answer so late.. it missed my attention somehow.. –  tomislav-maric Jan 21 '13 at 13:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.