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.
WinScrolled and WinResized autocommands ~
*win-scrolled-resized*
If you want to get notified of changes in window sizes, the |WinResized|
autocommand event can be used.
If you want to get notified of text in windows scrolling vertically or
horizontally, the |WinScrolled| autocommand event can be used. This will also
trigger in window size changes.
Exception: the events will not be triggered when the text scrolls for
'incsearch'.
*WinResized-event*
The |WinResized| event is triggered after updating the display, several
windows may have changed size then. A list of the IDs of windows that changed
since last time is provided in the v:event.windows variable, for example:
[1003, 1006]
*WinScrolled-event*
The |WinScrolled| event is triggered after |WinResized|, and also if a window
was scrolled. That can be vertically (the text at the top of the window
changed) or horizontally (when 'wrap' is off or when the first displayed part
of the first line changes). Note that |WinScrolled| will trigger many more
times than |WinResized|, it may slow down editing a bit.
The information provided by |WinScrolled| is a dictionary for each window that
has changes, using the window ID as the key, and a total count of the changes
with the key "all". Example value for |v:event|: >
{
all: {width: 0, height: 2, leftcol: 0, skipcol: 0, topline: 1, topfill: 0},
1003: {width: 0, height: -1, leftcol: 0, skipcol: 0, topline: 0, topfill: 0},
1006: {width: 0, height: 1, leftcol: 0, skipcol: 0, topline: 1, topfill: 0},
}
Note that the "all" entry has the absolute values of the individual windows
accumulated.
If you need more information about what changed, or you want to "debounce" the
events (not handle every event to avoid doing too much work), you may want to
use the `winlayout()` and `getwininfo()` functions.
|WinScrolled| and |WinResized| do not trigger when the first autocommand is
added, only after the first scroll or resize. They may trigger when switching
to another tab page.
The commands executed