If I have a Vim window open with 2 splits in it (3 total buffers visible) and I've adjusted the viewport of each split, then I close one buffer, the other two buffer's viewport's are automatically resized.
Is there a way to maintain or at least better scale the split when I close a buffer?
1) Vim window with three splits, custom size: +---+-------+---+ | | | | | 1 | 2 | 3 | | | | | +---+-------+---+ 2) Close buffer 3, splits are resized to "best fit": +-------+-------+ | | | | 1 | 2 | | | | +-------+-------+ 3) I want it to stay like this, resize only adjacent buffer: +---+-----------+ | | | | 1 | 2 | | | | +---+-----------+
To move between splits first press Ctrl-w (I remember this by Control Window, I'm not sure what the official mnemonic is) Then press a directional key to move the cursor to the split you're interested in. Directional key could be the arrows or my preferred home row method.
To increase a window to its maximum width, use Ctrl-w | . In Gvim and vim in terminals with mouse support, it is also possible to use the mouse to resize a window. Simply grab the statusline at the window border and drag it into the desired direction.
set noea
In other words:
set noequalalways
See equalalways in the Vim documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With