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
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -546,6 +546,7 @@ BufUnload Before unloading a buffer. This is when the
546546 NOTE: When this autocommand is executed, the
547547 current buffer "%" may be different from the
548548 buffer being unloaded "<afile> ".
549+ *E1546*
549550 Don't change to another buffer or window, it
550551 will cause problems!
551552 When exiting and v:dying is 2 or more this
@@ -644,6 +645,8 @@ CmdlineLeave Before leaving the command line; including
644645 <afile> is set to a single character,
645646 indicating the type of command-line.
646647 | cmdwin-char |
648+ Sets the | v:char | to the key that exited the
649+ command-line (e.g. <CR> , <CTRL-C> , <Esc> ).
647650 *CmdlineLeavePre*
648651CmdlineLeavePre Just before leaving the command line, and
649652 before | CmdlineLeave | . Useful for capturing
@@ -656,6 +659,7 @@ CmdlineLeavePre Just before leaving the command line, and
656659 or <Esc> . <afile> is set to a single
657660 character indicating the command-line type.
658661 See | cmdwin-char | for details.
662+ Sets | v:char | as with | CmdlineLeave | .
659663 *CmdwinEnter*
660664CmdwinEnter After entering the command-line window.
661665 Useful for setting options specifically for
@@ -1302,22 +1306,31 @@ TermResponse After the response to |t_RV| is received from
13021306 takes time is involved.
13031307 *TermResponseAll*
13041308TermResponseAll 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
13061310 the terminal. The value of | v:termresponse | ,
13071311 | 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 | )
13171321 Note that this event may be triggered halfway
13181322 executing another event, especially if file I/O,
13191323 a shell command or anything else that takes time
13201324 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.
13211334 *TextChanged*
13221335TextChanged After a change was made to the text in the
13231336 current buffer in Normal mode. That is after
0 commit comments