The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

Vim background smaller than terminal background

asked 2015-08-18 02:40:13 +0000

doctory gravatar image

It looks as though there is a colored border around vim, vim's border doesn't expand all the way to the edges. I haven't been able to find much information, any help is greatly appreciated.

edit retag flag offensive close merge delete


What terminal emulator are you using?

Airblader gravatar imageAirblader ( 2015-08-18 08:19:45 +0000 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-08-18 10:30:19 +0000

Adaephon gravatar image

The terminal itself also does not really expand all the way the edges. It is just not that visible. If you fill a line with # or if you reach the bottom of the terminal window, you will also notice that the distance between character and the window border.

The extend of the effect depends on the current size of the terminal window. The size of a terminal is usually measured in lines and columns, that is multiples of a single character's height and width, not pixels. Usually terminal emulators have size hints that indicate that its window should only be resized in fixed steps. Floating window managers (as well as i3 for floating windows) honor these hints, so these borders are usually not visible. But due to the - at the same time - dynamic and strict nature of i3 tiling mode, it is not possible to honor these hints: Child windows always must fill their parent container up to the borders, but the size of the parent container may not fulfill match the requirements of the hints. Also if you open a new terminal emulator in a container with several other terminal emulators, all of them have to be resized and their requirements may conflict.

The border you are seeing around Vim is a bit of space where the terminal window is a bit larger than columns * char_width or lines * char_height. Most modern terminal emulators just paint this space the same as their default background color. While Vim can set a background color, it cannot set the internal default of the terminal emulator, therefore a border remains. You will have the same effect with any other "full-terminal" program like for example Midnight Commander or Aptitude.

AFAIK there are really only two things that you can do about that: 1. Change the background color in Vim to match the terminals (or vice versa) 2. Use gVim

edit flag offensive delete link more

Question Tools


Asked: 2015-08-18 02:40:13 +0000

Seen: 128 times

Last updated: Aug 18