|
1 |
| -*autocmd.txt* For Vim version 9.1. Last change: 2024 Jan 14 |
| 1 | +*autocmd.txt* For Vim version 9.1. Last change: 2024 Jan 25 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -381,6 +381,7 @@ Name triggered by ~
|
381 | 381 | |CursorMoved| the cursor was moved in Normal mode
|
382 | 382 | |CursorMovedI| the cursor was moved in Insert mode
|
383 | 383 |
|
| 384 | +|WinNewPre| before creating a new window |
384 | 385 | |WinNew| after creating a new window
|
385 | 386 | |TabNew| after creating a new tab page
|
386 | 387 | |WinClosed| after closing a window
|
@@ -1098,7 +1099,7 @@ SafeState When nothing is pending, going to wait for the
|
1098 | 1099 | - Command line completion is active
|
1099 | 1100 | You can use `mode()` to find out what state
|
1100 | 1101 | Vim is in. That may be:
|
1101 |
| - - VIsual mode |
| 1102 | + - Visual mode |
1102 | 1103 | - Normal mode
|
1103 | 1104 | - Insert mode
|
1104 | 1105 | - Command-line mode
|
@@ -1390,6 +1391,18 @@ WinLeave Before leaving a window. If the window to be
|
1390 | 1391 | WinLeave autocommands (but not for ":new").
|
1391 | 1392 | Not used for ":qa" or ":q" when exiting Vim.
|
1392 | 1393 |
|
| 1394 | + *WinNewPre* |
| 1395 | +WinNewPre Before creating a new window. Triggered |
| 1396 | + before commands that modify window layout by |
| 1397 | + creating a split or new tab page. Not done for |
| 1398 | + the first window, when Vim has just started. |
| 1399 | + It is not allowed to modify window layout |
| 1400 | + while executing commands for the WinNewPre |
| 1401 | + event. |
| 1402 | + Most useful to store current window layout |
| 1403 | + and compare it with the new layout after the |
| 1404 | + Window has been created. |
| 1405 | + |
1393 | 1406 | *WinNew*
|
1394 | 1407 | WinNew When a new window was created. Not done for
|
1395 | 1408 | the first window, when Vim has just started.
|
|
0 commit comments