60

I have set my gnome-terminal's background to dark-blue, with a bit of transparency so I can see the underlying webpages or other documents when I code.

I've been using the smyck color scheme, which appears to be my terminal background as its background, so it looks seamless when I enter Vim.

my terminal window on top of a web page (my terminal window on top of a web page)

the very same terminal window entering vim (the very same terminal window entering vim)

Lately I decided to switch to some other color scheme. As I was trying out jellybeans, I noticed that it has overridden my default terminal background settings, both its color and transparency, as you can see below.

the very same terminal window entering vim now with jellybeans (the very same terminal window entering vim now with jellybeans)

I have installed the AfterColors plugin, but I don't know where to start to tweak the color scheme to have the default background back. Any suggestioins?

alxyzc
  • 1,021
  • 3
  • 12
  • 17

2 Answers2

99

Set the ctermbg to none:

hi Normal ctermbg=none
perreal
  • 94,503
  • 21
  • 155
  • 181
  • 1
    Thanks! That looks like a good start. Where can I find more information on the `:highlight` command? It looks like only setting the background color of "Normal" won't cut it completely, leaving some trivial areas unaffected. – alxyzc Feb 05 '14 at 08:53
  • 2
    great! I found that if you type only `:highlight`, you will get a list of all the current highlight options with live example, which is very helpful! – alxyzc Feb 05 '14 at 09:09
  • Thanks! I'd been looking for a solution to this problem for a long time :) – dwoodwardgb Sep 18 '16 at 01:23
  • 1
    For anyone else that may be looking. On NeoVIm sometimes you have to set guibg to none as well. `hi Normal guibg=none` – trve.fahad Oct 26 '16 at 18:25
  • 4
    If you are adding these to your .vimrc you need to place them after `syntax on` – Chance G Nov 16 '16 at 01:11
44

In addtional of perreal's answer, you also need to

highlight NonText ctermbg=none

this will help make other "nothing exist" region to be transparent.

liuyang1
  • 1,575
  • 1
  • 15
  • 23
  • 7
    The other answer isn't complete without this answer. If only both could be jointly accepted as the correct answer... – Metagrapher Mar 02 '17 at 16:16
  • 4
    I'll also add if anyone wants their line number non-transparent, that is done via `highlight LineNr ctermbg=none` – James Wright Sep 01 '19 at 23:47