vim-qf_resize


Ⅰ. 插件描述

Resize location/quickfix windows in (Neo)Vim

Ⅱ. 基本信息

创建日期:  2017-04-01
使用用户:  12
Github星:  31
插件作者:  Daniel Hahler

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-qf_resize

Automatically resize quickfix and location list windows.

This Vim plugin resizes location/quickfix windows based on the number of lines
therein, i.e. with a single list entry, why waste 9 extra lines (with the
default window height being 10)?!

Config

g:qf_resize_min_height

Minimum height (in lines) for quickfix windows.
If not specified, it will use some (experimental) internal defaults, falling
back to 1.
Can be a buffer setting (for the qf buffer).

g:qf_resize_max_height

Maximum height (in lines) for quickfix windows. Default: 10.
Can be a buffer setting (for the qf buffer).

g:qf_resize_max_ratio

Ratio used to get the dynamic max height.
It gets multiplied with the sum of the height of the non-qf window and the
height of the qf window. The default is 0.15.
Can be a buffer setting (for the qf buffer).

g:qf_resize_on_win_close

Resize/handle all qf windows when a window gets closed. Default: 1.

Commands

QfResizeWindows

Resize all quickfix/location list windows on the current tab page.

This is useful in a custom mapping (extending the default
Ctrl-w =):

nnoremap <silent> <c-w>= :wincmd =<cr>:QfResizeWindows<cr>

Related plugins

  • vim-qf provides a similar feature
    (g:qf_auto_resize), without handling :lopen/:copen etc in general,

but only when opening windows itself, and is less advanced in general (no
ratio etc).

添加新评论