Vim Tips Wiki

Custom resizing on the spot

1,624pages on
this wiki
Add New Page
Talk0 Share
Tip 1302 Printable Monobook Previous Next

created August 11, 2006 · complexity basic · author atomik fungus · version 5.7

This was inspired by VimTip173. Sometimes you don't want to have your windows on their max or min width (length) so I added the following commands to my vimrc.

"This two change in between vertical windows maximizing their length, and if you keep them pressed they will increase width by 2 columns steps.
"very nice when lines are too long to fit in just one row.
nmap <c-h> <c-w>h<c-w>_<c-w>><c-w>>
nmap <c-l> <c-w>l<c-w>_<c-w>><c-w>>

The same can be done for the horizontal split.


Take the time to figure out how to make this useful. By length the author means height. Should use a repeat number. If you need this tip to increase the width, won't you need a way to decrease it?

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki