bargreybars.vim


Ⅰ. 插件描述

bargreybars.vim: remove gray bars from maximised gvim windows, on Windows

Ⅱ. 基本信息

创建日期:  2017-03-08
使用用户:  2
Github星:  5
插件作者:  dreadnaut

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'dreadnaut/bargreybars-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'dreadnaut/bargreybars-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'dreadnaut/bargreybars-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/dreadnaut/vim-bargreybars

Ⅳ. 文档说明

# 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 and x64 DLLs in the repository were built with the Visual C++ 2019 Build Tools.

Choose your target environment by opening the correct Visual C++ command prompt, then run the matching batch file, or one of the commands below.

# x86
cl.exe /LD bargreybars.c Gdi32.lib User32.lib /Fe: bargreybars32.dll
# x64
cl.exe /LD bargreybars.c Gdi32.lib User32.lib /Fe: bargreybars64.dll

添加新评论