made to the text in the
current buffer in Insert mode, only when the
popup menu is visible. Otherwise the same as
TextChanged.
*TextChangedT*
TextChangedT After a change was made to the text in the
current buffer in |Terminal-mode|. Otherwise
the same as TextChanged.
*TextYankPost*
TextYankPost Just after a |yank| or |deleting| command, but not
if the black hole register |quote_| is used nor
for |setreg()|. Pattern must be "*".
Sets these |v:event| keys:
inclusive
operator
regcontents
regname
regtype
visual
The `inclusive` flag combined with the |'[|
and |']| marks can be used to calculate the
precise region of the operation.
Non-recursive (event cannot trigger itself).
Cannot change the text. |textlock|
*User*
User Not executed automatically. Use |:doautocmd|
to trigger this, typically for "custom events"
in a plugin. Example: >
:autocmd User MyPlugin echom 'got MyPlugin event'
:doautocmd User MyPlugin
< *UserGettingBored*
UserGettingBored When the user presses the same key 42 times.
Just kidding! :-)
*VimEnter*
VimEnter After doing all the startup stuff, including
loading vimrc files, executing the "-c cmd"
arguments, creating all windows and loading
the buffers in them.
Just before this event is triggered the
|v:vim_did_enter| variable is set, so that you
can do: >
if v:vim_did_enter
call s:init()
else
au VimEnter * call s:init()
endif
< *VimLeave*
VimLeave Before exiting Vim, just after writing the
.shada file. Executed only once, like
VimLeavePre.
Use |v:dying| to detect an abnormal exit.
Use |v:exiting| to get the exit code.
Not triggered if |v:dying| is 2 or more.
*VimLeavePre*
VimLeavePre Before exiting Vim, just before writing the
|shada| file. Executed only once, if the
pattern matches the current buffer on exit.
Mostly useful with a "*" pattern. >
:autocmd VimLeavePre * call CleanupStuff()
< Use |v:dying| to detect an abnormal exit.
Use |v:exiting| to get the exit code.
Not triggered if |v:dying| is 2 or more.
*VimResized*
VimResized After the Vim window was resized, thus 'lines'
and/or 'columns' changed. Not when starting
up though.
*VimResume*
VimResume After Nvim resumes from |suspend| state.
*VimSuspend*
VimSuspend Before Nvim enters |suspend| state.
*WinClosed*
WinClosed When closing a window, just before it is
removed from the window layout. The pattern
is matched against the |window-ID|. Both
<amatch> and <afile> are set to the |window-ID|.
After WinLeave.
Non-recursive (event cannot trigger itself).
See also |ExitPre|, |QuitPre|.
*WinEnter*
WinEnter After entering another window. Not done for
the first window, when Vim has just started.
Useful for setting the window height.
If the window is for another buffer, Vim
executes the BufEnter autocommands after the
WinEnter autocommands.
Note: For split and tabpage commands the
WinEnter event is triggered after the split
or tab command but before the file is loaded.
*WinLeave*
WinLeave Before leaving a window. If the window to be
entered next is for a different buffer, Vim
executes the BufLeave autocommands before the
WinLeave autocommands (but not for ":new").
Not used for ":qa" or ":q" when exiting Vim.
Before WinClosed.
*WinNew*
WinNew When a new window was created. Not done for
the first window, when Vim has just started.
Before WinEnter.
*WinScrolled*
WinScrolled After any window in the current tab page
scrolled the text (horizontally or vertically)
or changed width or height. See
|win-scrolled-resized|.
Note: This can not be skipped with
`:noautocmd`, because it triggers