My "simple" way to resize split windows on Vim.
- Resize vertical split
- Resize horizontal split
Use your favorite plugin manager, or try dein.vim.
Install dein.vim, and add the following line to your ~/.vimrc
:
call dein#add('sinetoami/vim-winresize')
And then execute the following command on to your Vim:
:call dein#install()
If you are not using a package manager, download manually the zip repo and extract the files to ~/.vim
:
$ cp vim-winresize-master.zip ~/.vim
$ cd ~/.vim
$ unzip vim-winresize-master.zip -d /destination/plugins/folder
$ rm vim-winresize-master.zip
:WinResizeLeft
and:WinResizeRight
will resize a vertical window split toleft
andright
directions respectively:WinResizeTop
and:WinResizeBottom
will resize a horizontal window split totop
andbottom
directions respectively
To me, the best way is mapping these commands. E.g.:
map <silent><S-Left> :WinResizeLeft<CR>
map <silent><S-A-Up> :WinResizeTop<CR>
Do you like this plugin? Come on:
Distributed under the terms of the Vim license.
See :help license
.