Ⅰ. 插件描述
A small vim plugin to quickly maximize/unmaximize the current windowⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'kabbamine/vzoom'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'kabbamine/vzoom'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'kabbamine/vzoom'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/kabbamine/vzoom.vim
Ⅳ. 文档说明
# vZoom - Quickly maximize & unmaximize the current window
Description
This plugin allows to maximize/unmaximize the current window:
Manually
Or automatically:

Mappings
No mapping by default, define your own.
e.g.
nmap gsz <Plug>(vzoom)Use it to maximize/unmaximize your current window.
Even quicker, just leave the maximized window and it will get its initial size back.
Commands
You can enable automatic zoom with:
:VZoomAutoToggleFor disabling it, you can either use the command above or the <Plug>(vzoom) key mapping.
Installation
Copy the distributed files into Vim runtime directory which is usually ~/.vim/, or $HOME/vimfiles on Windows.
Or in a better way, use a vim plugin manager.
e.g with Vim-plug plus lazyloading:
Plug 'KabbAmine/vZoom.vim', {'on': ['<Plug>(vzoom)', 'VZoomAutoToggle']}Configuration
The plugin's configuration is stored in one global dictionnary g:vzoom.
To define/modify an option you can either:
let g:vzoom = {}
let g:vzoom.option1 = 'foo'
let g:vzoom.option2 = 0Or:
let g:vzoom = {
\ 'option1': 'foo',
\ 'option2': 0
\ }Options
| option | description | default |
|---|---|---|
equalise_windows | Equalise size of windows (<C-w>=) after unmaximizing | 0 |
N.B
- The plugin uses
setwinvar()function to set back the initial size of the window, but unfortunately sometimes it can fail. So to prevent strange behavior, always setg:vzoom.equalise_windowsto1. - For the same reason above, when using
VZoomAutoToggleand disabling auto-zoom the windows are always resized equally regardless of theg:vzoom.equalise_windowsvalue.
Notes
Thanks to Bram Moolenaar for creating the best piece of software in the world :heart:
Thanks to you if you're using vZoom.
License
MIT