If you resize the terminal window you're running vim (or macvim) in, is there any vimscript event that gets triggered and which you can attach autocommands to?
To resize all windows to equal dimensions based on their splits, you can use Ctrl-w = . To increase a window to its maximum height, use Ctrl-w _ . To increase a window to its maximum width, use Ctrl-w | . In Gvim and vim in terminals with mouse support, it is also possible to use the mouse to resize a window.
Snap with Snap Assist To use Snap Assist, click the thumbnail of the window you want to open. If you have two windows displayed side-by-side, you can resize both windows simultaneously by selecting and dragging the dividing line.
To move from the current Vim window to the next one, type CTRL-W j (or CTRL-W <down> or CTRL-W CTRL-J). The CTRL-W is the mnemonic for “window” command, and the j is analogous to Vim's j command, which moves the cursor to the next line.
Use the arrow keys to resize the window. Press-and-hold Alt, then middle-click near the corner that you want to resize. The mouse pointer changes to indicate that you can resize from the corner.
The event you are looking for is VimResized
. See :help VimResized
for more information.
For a complete list of autocmd events and details about them individually, see :help autocmd-events
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With