Ⅰ. 插件描述
Adjust window size with Ctrl +jklhⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/directionalwindowresizer'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/directionalwindowresizer'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/directionalwindowresizer'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/directionalWindowResizer
Ⅳ. 文档说明
The idea behind this plugin is to allow users to resize windows by using the Ctrl key (or something else the user may choose) + whatever they have assigned to <down> <up> <left> & <right> which by default is obviously jkhl.
Therefore, by default, the windows adjustment functions in directionalWindowResizer.vim are set to <Ctrl+j> for down, <Ctrl+k> for up, <Ctrl+l> for right & <Ctrl +h> for left
These mappings are at the very top of the file, adjust them to whatever suits your needs
The behaviour of it is as follows:
Whatever window is currently selected is the window that is going to be resized.
Ctrl j - if bottom most window selected, window size is reduced by 1
- for all other windows the bottom border is pushed downwards by 1
Ctrl k - if top most window selected, window size is reduced by 1
- for all other windows the top border is pushed upwards by 1
Ctrl l - if right most window selected, window size is reduced by 1
- for all other windows the right border is pushed to the right by 1
Ctrl h - if left most window selected, window size is reduced by 1
- for all other windows the left border is pushed to the left by 1
If you only have 1 window or if you only have vertically split windows Ctrl j &
Ctrl k will not work ie if you only have vertical splits why would you want to reduce all their sizes? Similarily if you only have 1 window or you only have horizontally split windows Ctrl l & Ctrl h won't work either.