Now that you’re more familiar with Vim’s multiwindowing features, you need a little more control over them. This section addresses how you can change the size of the current window, with, of course, effects on other windows in the screen. Vim provides options to control window sizes and window sizing behavior when opening new windows with split commands.
If you’d rather control window sizes sans
commands, use gvim and let the mouse do the work for you. Simply click and
drag window boundaries with the mouse to resize. For vertically
separated windows, click the mouse on the vertical separator of
| characters. Horizontal windows
are separated by their status lines.
As you’d expect, Vim has vertical and horizontal resize commands. Like the other window commands, these all begin with CTRL-W and map nicely to mnemonic devices, making them easy to learn and remember.
CTRL-W= tries to resize all windows to equal
size. (This is also influenced by the current values of
windwidth, discussed in the following
section.) If the available screen real estate doesn’t divide
equally, Vim sizes the windows to be as close to equal as
CTRL-W- decreases the current window height by
one line. Vim also has an ex
command that lets you decrease the window size explicitly. For
example, the command
decreases the current window by four lines and gives those lines to
the window below it.
It’s interesting to note that Vim obediently decreases ...