Custom resizing on the spot

From Vim Tips Wiki

Jump to: navigation, search
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.

[edit] Comments

 TO DO 
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?


Personal tools