You can see the Gnome Terminal's default purple background showing at the edges of the terminal. Is there a known fix for this? My window manager is Xmonad.
-
This is the fault of your terminal emulator, not vim. See if it has an option to snap the window size to the terminal. – Fred Nurk Oct 15 '14 at 06:40
1 Answers
What happens…
The window of your terminal emulator is resized by your window manager to fill an area defined in pixels but your terminal emulator — and every program you run in it — thinks in "cells" whose size in pixels depends on the font size you set in its preferences.
The bleeding background shows that the pixel size of the window, as calculated by your window manager, is larger than the pixel size of the grid used by your terminal emulator. It is only made obvious by the fact that your Vim colorscheme defines a background color different from your terminal emulator's one.
How to fix it…
You have a few options:
Setup your window manager so that it respects your terminal emulator's hints when resizing windows. Note that it will probably cause your terminal emulators to not fit exactly in your window manager's grid which may or may not be a showstopper for you.
Setup your terminal emulator's background color to be the same as the one in your Vim colorscheme.
Find a colorscheme that doesn't define a background color.

- 186,200
- 21
- 280
- 313
-
Point 3 is very hard, i don't know a colorscheme where is no background defined – demonking Oct 15 '14 at 07:11
-
1@demonking, my colorscheme, [Apprentice](https://github.com/romainl/Apprentice), doesn't define a background color when run in a 8/16 colors terminal. That said, I'd go with the second solution. – romainl Oct 15 '14 at 07:15
-
Awesome, that was more or less what I was expecting. Thanks for providing the link to the xmonad docs. :) – archgoon Oct 16 '14 at 00:46
-
You could also remove the background from the colorscheme yourself. My vim is entirely transparent because I've put a few lines on the bottom of my colorscheme like `hi Normal ctermbg=none`. – Darkwater Dec 15 '14 at 18:31