Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 16 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.


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. – Robert Audi Feb 9 '14 at 21:19

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. – tmaric 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.. – tmaric Jan 21 '13 at 13:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .