Skip to content

Commit a6a60c5

Browse files
committed
autocmd.txt: Update Vim 8.2.4804
1 parent c585344 commit a6a60c5

File tree

1 file changed

+43
-37
lines changed

1 file changed

+43
-37
lines changed

en/autocmd.txt

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 8.2. Last change: 2022 Apr 08
1+
*autocmd.txt* For Vim version 8.2. Last change: 2022 Apr 17
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -95,6 +95,7 @@ Or use `:execute`: >
9595
:augroup mine | exe "au! BufRead *" | augroup END
9696
:augroup mine | exe "au BufRead * set tw=70" | augroup END
9797
98+
< *autocmd-expand*
9899
Note that special characters (e.g., "%", "<cword>") in the ":autocmd"
99100
arguments are not expanded when the autocommand is defined. These will be
100101
expanded when the Event is recognized, and the {cmd} is executed. The only
@@ -473,13 +474,15 @@ BufRead or BufReadPost When starting to edit a new buffer, after
473474
executing the modelines. See |BufWinEnter|
474475
for when you need to do something after
475476
processing the modelines.
476-
This does NOT work for ":r file". Not used
477-
when the file doesn't exist. Also used after
478-
successfully recovering a file.
479-
Also triggered for the filetypedetect group
480-
when executing ":filetype detect" and when
481-
writing an unnamed buffer in a way that the
482-
buffer gets a name.
477+
Also triggered:
478+
- when writing an unnamed buffer in a way that
479+
the buffer gets a name
480+
- after successfully recovering a file
481+
- for the filetypedetect group when executing
482+
":filetype detect"
483+
Not triggered:
484+
- for the `:read file` command
485+
- when the file doesn't exist
483486
*BufReadCmd*
484487
BufReadCmd Before starting to edit a new buffer. Should
485488
read the file into the buffer. |Cmd-event|
@@ -707,9 +710,38 @@ CursorMoved After the cursor was moved in Normal or Visual
707710
CursorMovedI After the cursor was moved in Insert mode.
708711
Not triggered when the popup menu is visible.
709712
Otherwise the same as CursorMoved.
713+
*DiffUpdated*
714+
DiffUpdated After diffs have been updated. Depending on
715+
what kind of diff is being used (internal or
716+
external) this can be triggered on every
717+
change or when doing |:diffupdate|.
718+
*DirChangedPre*
719+
DirChangedPre The working directory is going to be changed,
720+
as with |DirChanged|. The pattern is like
721+
with |DirChanged|. The new directory can be
722+
found in v:event.directory.
723+
*DirChanged*
724+
DirChanged The working directory has changed in response
725+
to the |:cd| or |:tcd| or |:lcd| commands, or
726+
as a result of the 'autochdir' option.
727+
The pattern can be:
728+
"window" to trigger on `:lcd`
729+
"tabpage" to trigger on `:tcd`
730+
"global" to trigger on `:cd`
731+
"auto" to trigger on 'autochdir'.
732+
"drop" to trigger on editing a file
733+
<afile> is set to the new directory name.
710734
*EncodingChanged*
711735
EncodingChanged Fires off after the 'encoding' option has been
712736
changed. Useful to set up fonts, for example.
737+
*ExitPre*
738+
ExitPre When using `:quit`, `:wq` in a way it makes
739+
Vim exit, or using `:qall`, just after
740+
|QuitPre|. Can be used to close any
741+
non-essential window. Exiting may still be
742+
cancelled if there is a modified buffer that
743+
isn't automatically saved, use |VimLeavePre|
744+
for really exiting.
713745
*FileAppendCmd*
714746
FileAppendCmd Before appending to a file. Should do the
715747
appending to the file. Use the '[ and ']
@@ -737,35 +769,6 @@ FileChangedRO Before making the first change to a read-only
737769
*E881*
738770
If the number of lines changes saving for undo
739771
may fail and the change will be aborted.
740-
*DiffUpdated*
741-
DiffUpdated After diffs have been updated. Depending on
742-
what kind of diff is being used (internal or
743-
external) this can be triggered on every
744-
change or when doing |:diffupdate|.
745-
*DirChangedPre*
746-
DirChangedPre The working directory is going to be changed,
747-
as with |DirChanged|. The pattern is like
748-
with |DirChanged|. The new directory can be
749-
found in v:event.directory.
750-
*DirChanged*
751-
DirChanged The working directory has changed in response
752-
to the |:cd| or |:tcd| or |:lcd| commands, or
753-
as a result of the 'autochdir' option.
754-
The pattern can be:
755-
"window" to trigger on `:lcd`
756-
"tabpage" to trigger on `:tcd`
757-
"global" to trigger on `:cd`
758-
"auto" to trigger on 'autochdir'.
759-
"drop" to trigger on editing a file
760-
<afile> is set to the new directory name.
761-
*ExitPre*
762-
ExitPre When using `:quit`, `:wq` in a way it makes
763-
Vim exit, or using `:qall`, just after
764-
|QuitPre|. Can be used to close any
765-
non-essential window. Exiting may still be
766-
cancelled if there is a modified buffer that
767-
isn't automatically saved, use |VimLeavePre|
768-
for really exiting.
769772
*FileChangedShell*
770773
FileChangedShell When Vim notices that the modification time of
771774
a file has changed since editing started.
@@ -1205,6 +1208,9 @@ TextYankPost After text has been yanked or deleted in the
12051208
current buffer. The following values of
12061209
|v:event| can be used to determine the operation
12071210
that triggered this autocmd:
1211+
inclusive TRUE if the motion is
1212+
|inclusive| else the motion is
1213+
|exclusive|.
12081214
operator The operation performed.
12091215
regcontents Text that was stored in the
12101216
register, as a list of lines,

0 commit comments

Comments
 (0)