在Vim中关闭拆分窗口而不调整其他窗口的大小

时间:2009-01-28 00:51:50

标签: vim window split

如果我打开一个带有2个分割的Vim窗口(3个总缓冲区可见)并且我调整了每个分割的视口,那么我关闭一个缓冲区,另外两个缓冲区的视口会自动调整大小。

关闭缓冲区时,有没有办法维持或至少更好地缩放分割?

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     |
  |   |           |
  +---+-----------+

1 个答案:

答案 0 :(得分:40)

set noea
" i.e.
set equalalways

请参阅Vim文档中的equalalways