6. Window resizing *window-resize* *CTRL-W_=* CTRL-W = Make all windows (almost) equally high and wide, but use 'winheight' and 'winwidth' for the current window. Windows with 'winfixheight' set keep their height and windows with 'winfixwidth' set keep their width. :res[ize] -N *:res* *:resize* *CTRL-W_-* CTRL-W - Decrease current window height by N (default 1). If used after 'vertical': decrease width by N. :res[ize] +N *CTRL-W_+* CTRL-W + Increase current window height by N (default 1). If used after 'vertical': increase width by N. :res[ize] [N] CTRL-W CTRL-_ *CTRL-W_CTRL-_* *CTRL-W__* CTRL-W _ Set current window height to N (default: highest possible). z{nr}<CR> Set current window height to {nr}. *CTRL-W_<* CTRL-W < Decrease current window width by N (default 1). *CTRL-W_>* CTRL-W > Increase current window width by N (default 1). :vertical res[ize] [N] *:vertical-resize* *CTRL-W_bar* CTRL-W | Set current window width to N (default: widest possible). You can also resize a window by dragging a status line up or down with the mouse. Or by dragging a vertical separator line left or right. This only works if the version of Vim that is being used supports the mouse and the 'mouse' option has been set to enable it. The option 'winheight' ('wh') is used to set the minimal window height of the current window. This option is used each time another window becomes the current window. If the option is '0', it is disabled. Set 'winheight' to a very large value, e.g., '9999', to make the current window always fill all available space. Set it to a reasonable value, e.g., '10', to make editing in the current window comfortable. The equivalent 'winwidth' ('wiw') option is used to set the minimal width of the current window. When the option 'equalalways' ('ea') is set, all the windows are automatically made the same size after splitting or closing a window. If you don't set this option, splitting a window will reduce the size of the current window and leave the other windows the same. When closing a window, the extra lines are given to the window above it. The 'eadirection' option limits the direction in which the 'equalalways' option is applied. The default "both" resizes in both directions. When the value is "ver" only the heights of windows are equalized. Use this when you have manually resized a vertically split window and want to keep this width. Likewise, "hor" causes only the widths of windows to be equalized. The option 'cmdheight' ('ch') is used to set the height of the command-line. If you are annoyed by the |hit-enter| prompt for long messages, set this option to 2 or 3. If there is only one window, resizing that window will also change the command line height. If there are several windows, resizing the current window will also change the height of the window below it (and sometimes the window above it). The minimal height and width of a window is set with 'winminheight' and 'winminwidth'. These are hard values, a window will never become smaller. ==============================================================================
**CTRL-W
= 使得所有窗口 (几乎) 等宽、等高,但当前窗口使用 'winheight' 和
'winwidth'。
:res[ize] -N ** ** **CTRL-W
- 使得当前窗口高度减 N (默认值是 1)。
如果在 'vertical' 之后使用,则使得宽度减 N。
:res[ize] +N **CTRL-W
+ 使得当前窗口高度加 N (默认值是 1)。
如果在 'vertical' 之后使用,则使得宽度加 N。
:res[ize] [N]CTRL-W
CTRL-_
** **CTRL-W
_ 设置当前窗口的高度为 N (默认值为最大可能高度)。
z{nr}
<CR>
设置当前窗口的高度为{nr}
。
**CTRL-W
< 使得当前窗口宽度减 N (默认值是 1)。
**CTRL-W
> 使得当前窗口宽度加 N (默认值是 1)。
:vertical res[ize] [N] ** **CTRL-W
| 设置当前窗口的宽度为 N (默认值为最大可能宽度)。