37

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     |
  |   |           |
  +---+-----------+
matpie
  • 17,033
  • 9
  • 61
  • 82

1 Answers1

54
set noea

In other words:

set noequalalways

See equalalways in the Vim documentation.

Bryan Henry
  • 8,348
  • 3
  • 34
  • 30
strager
  • 88,763
  • 26
  • 134
  • 176