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

2 Answers 2


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
  • 1
    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, 2012 at 20:20
  • 6
    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. Feb 9, 2014 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.

  • 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, 2012 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, 2012 at 18:14
  • sorry for accepting your answer so late.. it missed my attention somehow..
    – tmaric
    Jan 21, 2013 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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