Before Resize Mode: Awkward, Slow
Ctrl-W+Ctrl-W+Ctrl-W+Ctrl-W+Ctrl-W+Ctrl-W>Ctrl-W>
With Resize Mode: Blisteringly Fast! Exuberant!
Ctrl-W+++++>>
Resize Mode is a tiny, unobtrusive Vim plugin that makes resizing windows easier. It streamlines window resizing by allowing you to repeat resize operations without having to keep telling Vim that you want to resize the window, but it stays out of your way: resizing uses the same keystrokes you already know, and if you forget it’s there, Vim will work completely normally as it always has.
Resize Mode is implemented in pure Vimscript. Simply install normally using Vim’s packages feature*, or with your favourite plugin manager.
* See the Using a single plugin and loading it automatically subheading.
No configuration is required.*
* See :help resize-mode-mappings for advanced configuration.
ENTER resize mode by using Vim’s normal resize mappings:
- Ctrl-W+
- Ctrl-W-
- Ctrl-W>
- Ctrl-W<
CONTINUE resizing by pressing any of the resize keys:
- +
- -
- >
- <
EXIT resize mode by using any Vim command that is not a window resize command. Yes, this is INCONSISTENT with Vim’s other modes, but this means that Vim is so unobtrusive that if you forget it’s there, you won’t trip over it: Vim’s resize functions will work as they always did before. So there’s no risk! Install it today!
Why Not Just Use a [count]?
Visual Feedback! Sometimes it’s easier to MASH a resize key rather than attempting to figure out in advance precisely how many lines to resize.
And Resize Mode is even better when you use a [count], because it maintains the count throughout the resize operation!
I’m not terrible at eyeballing numbers of lines, but it’s still quicker for me to type:
5Ctrl-W+++++++++
than:
50Ctrl-W+ Whoops! Overshot… Ctrl-W5-.