Skip to content

Commit b1bfc5b

Browse files
committed
autocmd.txt: Vim 8.2.2377
1 parent feaecf7 commit b1bfc5b

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

en/autocmd.txt

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 8.2. Last change: 2020 Oct 26
1+
*autocmd.txt* For Vim version 8.2. Last change: 2020 Dec 19
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -70,6 +70,11 @@ effects. Be careful not to destroy your text.
7070
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
7171
See |autocmd-buflocal|.
7272

73+
If the `:autocmd` is in Vim9 script (a script that starts with `:vim9script`
74+
and in a `:def` function) then {cmd} will be executed as in Vim9
75+
script. Thus this depends on where the autocmd is defined, not where it is
76+
triggered.
77+
7378
Note: The ":autocmd" command can only be followed by another command when the
7479
'|' appears before {cmd}. This works: >
7580
:augroup mine | au! BufRead | augroup END
@@ -301,6 +306,9 @@ Name triggered by ~
301306
|VimLeavePre| before exiting Vim, before writing the viminfo file
302307
|VimLeave| before exiting Vim, after writing the viminfo file
303308

309+
|VimSuspend| when suspending Vim
310+
|VimResume| when Vim is resumed after being suspended
311+
304312
Terminal
305313
|TerminalOpen| after a terminal buffer was created
306314
|TerminalWinOpen| after a terminal buffer was created in a new window
@@ -551,12 +559,15 @@ CmdlineChanged After a change was made to the text in the
551559
*CmdlineEnter*
552560
CmdlineEnter After moving the cursor to the command line,
553561
where the user can type a command or search
554-
string.
562+
string; including non-interactive use of ":"
563+
in a mapping, but not when using |<Cmd>|.
555564
<afile> is set to a single character,
556565
indicating the type of command-line.
557566
|cmdwin-char|
558567
*CmdlineLeave*
559-
CmdlineLeave Before leaving the command line.
568+
CmdlineLeave Before leaving the command line; including
569+
non-interactive use of ":" in a mapping, but
570+
not when using |<Cmd>|.
560571
Also when abandoning the command line, after
561572
typing CTRL-C or <Esc>.
562573
When the commands result in an error the
@@ -840,6 +851,8 @@ FuncUndefined When a user function is used but it isn't
840851
when it's used. The pattern is matched
841852
against the function name. Both <amatch> and
842853
<afile> are set to the name of the function.
854+
Not triggered when compiling a |Vim9|
855+
function.
843856
NOTE: When writing Vim scripts a better
844857
alternative is to use an autoloaded function.
845858
See |autoload-functions|.
@@ -1207,6 +1220,7 @@ VimLeave Before exiting Vim, just after writing the
12071220
To detect an abnormal exit use |v:dying|.
12081221
When v:dying is 2 or more this event is not
12091222
triggered.
1223+
To get the exit code use |v:exiting|.
12101224
*VimLeavePre*
12111225
VimLeavePre Before exiting Vim, just before writing the
12121226
.viminfo file. This is executed only once,
@@ -1217,10 +1231,22 @@ VimLeavePre Before exiting Vim, just before writing the
12171231
< To detect an abnormal exit use |v:dying|.
12181232
When v:dying is 2 or more this event is not
12191233
triggered.
1234+
To get the exit code use |v:exiting|.
12201235
*VimResized*
12211236
VimResized After the Vim window was resized, thus 'lines'
12221237
and/or 'columns' changed. Not when starting
12231238
up though.
1239+
*VimResume*
1240+
VimResume When the Vim instance is resumed after being
1241+
suspended and |VimSuspend| was triggered.
1242+
Useful for triggering |:checktime| and ensure
1243+
the buffers content did not change while Vim
1244+
was suspended: >
1245+
:autocmd VimResume * checktime
1246+
< *VimSuspend*
1247+
VimSuspend When the Vim instance is suspended. Only when
1248+
CTRL-Z was typed inside Vim, not when the
1249+
SIGSTOP or SIGTSTP signal was sent to Vim.
12241250
*WinEnter*
12251251
WinEnter After entering another window. Not done for
12261252
the first window, when Vim has just started.

0 commit comments

Comments
 (0)