Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there an vim event triggered by terminal window resizing?

Tags:

vim

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?

like image 625
dan Avatar asked Dec 12 '10 23:12

dan


People also ask

How do I resize a window in Vim?

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.

Which feature is used to quickly resize an opened 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.

How do I switch between windows and Vim?

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.

Which is used to resize an opened window?

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.


1 Answers

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.

like image 74
Randy Morris Avatar answered Oct 30 '22 10:10

Randy Morris