1
- *autocmd.txt* For Vim version 9.1. Last change: 2025 Jun 19
1
+ *autocmd.txt* For Vim version 9.1. Last change: 2025 Sep 02
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,31 @@ 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:
1311
- "version" ,
1312
- "cursorblink",
1313
- "cursorshape",
1314
- "background ",
1315
- "foreground ",
1316
- "ambiguouswidth"
1312
+ | v:termu7resp | , and | v:termosc |
1313
+ correspondingly, can be used. <amatch> will
1314
+ be set to any of:
1315
+ "ambiguouswidth" ( | t_u7 | ) ,
1316
+ "cursorblink" ( | t_RC | ) ,
1317
+ "cursorshape" ( | t_RS | ) ,
1318
+ "da1 ",
1319
+ "osc ",
1320
+ "version" ( | t_RV | )
1317
1321
Note that this event may be triggered halfway
1318
1322
executing another event, especially if file I/O,
1319
1323
a shell command or anything else that takes time
1320
1324
is involved.
1325
+ Note: Traditionally, TermResponseAll was also
1326
+ used for "foreground" and "background"
1327
+ patterns. These are now handled as part of
1328
+ the "osc" value. For backwards compatibility,
1329
+ the $VIMRUNTIME/plugin/colorresp.vim plugin
1330
+ will handle "osc" events and emit
1331
+ TermResponseAll autocommand events when it
1332
+ encounters "foreground" and "background"
1333
+ values.
1321
1334
*TextChanged*
1322
1335
TextChanged After a change was made to the text in the
1323
1336
current buffer in Normal mode. That is after
0 commit comments