Skip to content
bargreybars.vim: remove gray bars from maximised gvim windows, on Windows
C Vim script Makefile Batchfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dll
plugin
LICENSE
README.md

README.md

bargreybars.vim

Gvim windows have a grey background hidden behind the text area. When maximised their dimensions are not a multiple of the font size, so the background shows up as grey bars on the right and bottom side of the windows.

The goggles do nothing!

This plugin keeps the windows background in sync with your color scheme.

Nice and uniform

Grey bars gone, the world is safe again!

Note: the plugin works only on Windows. GTK-based Vim can be tweaked in a different way, and the issue has been reported in the Vim tracker.

Features

By default, bargreybars.vim runs automatically when you start gvim and when you switch colorscheme. This behaviour can be disabled in your .vimrc file with:

let g:bargreybars_auto = 0

If the automatic color-matching is disabled, you can use the Colorscheme command to apply a scheme and match the window background color. It works the same way as the standard colorscheme command.

:Colorscheme zenburn

Installation

The plugin is compatible with pathogen.vim and a similar plugin managers.

Here's the clone command for you copy-paste convenience:

git clone https://github.com/dreadnaut/vim-bargreybars.git

There, no further configuration is needed, you are ready to go.

Building the dll from source

The plugin relies on a C library that modifies the window attributes. It is heavily inspired by gvimfullscreen, and compatible with it. Source code for the library is included in the dll directory.

The x86 dll in the repository is built with the Visual C++ 2015 Build Tools. The code also compiles as x64.

Choose your target environment by opening the correct Visual C++ command prompt, then build the dll file with nmake, the included batch script, or the command below —I like options.

cl.exe /LD bargreybars.c Gdi32.lib User32.lib
You can’t perform that action at this time.