2009-01-28 103 views
25

如果我打開一個Vim窗口,其中有2個分割(總共3個緩衝區可見),並且我調整了每個分割的視口,然後關閉一個緩衝區,另一個兩個緩衝區的視口會自動調整大小。在Vim中關閉分割窗口而不調整其他窗口的尺寸

當我關閉緩衝區時,是否有辦法維持或至少更好地縮放分割?

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

回答

35
set noea 
" i.e. 
set equalalways 

equalalways Vim的文檔。

+0

非常感謝!我沒有搜索文檔,但我想我沒有足夠努力: -/ – matpie 2009-01-28 01:05:19