如何设置窗口分割的高度?

时间:2014-02-09 16:27:46

标签: vim

:sp将当前窗口水平分割为两个。

如何设置新窗口的高度

我想象的是:

:sp --width=30

1 个答案:

答案 0 :(得分:7)

:split前加上一个数字,您可以设置高度:

" Split a 10-line height window above:
:10split

" Or to open the new viewport below the current
:below 10split

来自:help split

:[N]sp[lit] [++opt] [+cmd]                              :sp :split
                Split current window in two.  The result is two viewports on
                the same file.  Make new window N high (default is to use half
                the height of the current window)