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
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,32 @@ 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:
1312+ | v:termu7resp | , and | v:termosc |
1313+ correspondingly, can be used. <amatch> will
1314+ be set to any of:
13111315 "version",
13121316 "cursorblink",
13131317 "cursorshape",
1314- "background",
1315- "foreground",
13161318 "ambiguouswidth"
1319+ "osc"
13171320 Note that this event may be triggered halfway
13181321 executing another event, especially if file I/O,
13191322 a shell command or anything else that takes time
13201323 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+
13211335 *TextChanged*
13221336TextChanged After a change was made to the text in the
13231337 current buffer in Normal mode. That is after
0 commit comments