Ⅰ. 插件描述
A vim global plugin that allows for quick window sizingⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'claytron/vimsizer'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'claytron/vimsizer'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'claytron/vimsizer'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/claytron/vimsizer
Ⅳ. 文档说明
# Vimsizer #
Vimsizer is a simple plugin that was inspired by the
Firesizer extension
for Firefox. This plugin gives you the ability to define a re-usable set of
window dimensions.
There are two default sizes that are defined with thevs_window_sizes variable:
let vs_window_sizes = {"normal": "150 40", "bigger": "210 50"}
You can define your own set of sizes. Example:
let vs_window_sizes = {"miniscule": "25 10", "magiscule": "200 60"}
Once the window sizes have been defined then you can use theVSSelectWindowSize command to switch. Example:
:VSSelectWindowSize bigger
:VSSelectWindowSize normal
You can also quickly switch to any specific size you like with theVSWindowSize command:
:VSWindowSize 100 20
You can use the autogroup command to set the window size on startup.
Example:
au VimEnter * exe 'VSSelectWindowSize normal'
This would set the window size to normal upon entering vim for the first
time.
You could also map a shortcut key to a window size. Example:
map <leader>1 :VSSelectWindowSize normal<CR>
map <leader>2 :VSSelectWindowSize bigger<CR>
The latest code is available on Github: http://github.com/claytron/vimsizer
To install this plugin simply copy the vimsizer.vim into the plugin
directory and vimsizer.txt into the doc directory in your vim folder.