1
- *autocmd.txt* For Vim version 9.1. Last change: 2025 Jun 19
1
+ *autocmd.txt* For Vim version 9.1. Last change: 2025 Aug 27
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -546,6 +546,7 @@ BufUnload Before unloading a buffer. This is when the
546
546
NOTE: When this autocommand is executed, the
547
547
current buffer "%" may be different from the
548
548
buffer being unloaded "<afile> ".
549
+ *E1546*
549
550
Don't change to another buffer or window, it
550
551
will cause problems!
551
552
When exiting and v:dying is 2 or more this
@@ -644,6 +645,8 @@ CmdlineLeave Before leaving the command line; including
644
645
<afile> is set to a single character,
645
646
indicating the type of command-line.
646
647
| cmdwin-char |
648
+ Sets the | v:char | to the key that exited the
649
+ command-line (e.g. <CR> , <CTRL-C> , <Esc> ).
647
650
*CmdlineLeavePre*
648
651
CmdlineLeavePre Just before leaving the command line, and
649
652
before | CmdlineLeave | . Useful for capturing
@@ -656,6 +659,7 @@ CmdlineLeavePre Just before leaving the command line, and
656
659
or <Esc> . <afile> is set to a single
657
660
character indicating the command-line type.
658
661
See | cmdwin-char | for details.
662
+ Sets | v:char | as with | CmdlineLeave | .
659
663
*CmdwinEnter*
660
664
CmdwinEnter After entering the command-line window.
661
665
Useful for setting options specifically for
@@ -1302,22 +1306,32 @@ TermResponse After the response to |t_RV| is received from
1302
1306
takes time is involved.
1303
1307
*TermResponseAll*
1304
1308
TermResponseAll After the response to | t_RV | , | t_RC | , | t_RS | ,
1305
- | t_RB | , | t_RF | , or | t_u7 | are received from
1309
+ | t_u7 | or any OSC command are received from
1306
1310
the terminal. The value of | v:termresponse | ,
1307
1311
| v:termblinkresp | , | v:termstyleresp | ,
1308
- | v:termrbgresp | , | v:termrfgresp | , and
1309
- | v:termu7resp | , correspondingly, can be used.
1310
- <amatch> will be set to any of:
1312
+ | v:termu7resp | , and | v:termosc |
1313
+ correspondingly, can be used. <amatch> will
1314
+ be set to any of:
1311
1315
"version",
1312
1316
"cursorblink",
1313
1317
"cursorshape",
1314
- "background",
1315
- "foreground",
1316
1318
"ambiguouswidth"
1319
+ "osc"
1317
1320
Note that this event may be triggered halfway
1318
1321
executing another event, especially if file I/O,
1319
1322
a shell command or anything else that takes time
1320
1323
is involved.
1324
+ Note: Traditionally, TermResponseAll was also
1325
+ used for "foreground" and "background"
1326
+ patterns. These are now handled as part of
1327
+ the "osc" value. For backwards compatibility,
1328
+ the $VIMRUNTIME/plugin/colorresp.vim plugin
1329
+ will handle "osc" events and emit
1330
+ TermResponseAll autocommand events when it
1331
+ encounters "foreground" and "background"
1332
+ values.
1333
+
1334
+
1321
1335
*TextChanged*
1322
1336
TextChanged After a change was made to the text in the
1323
1337
current buffer in Normal mode. That is after
0 commit comments