of the file where
this option was set. <amatch> expands to the
new value of 'syntax'.
See |:syn-on|.
*TabEnter*
TabEnter Just after entering a tab page. |tab-page|
After WinEnter.
Before BufEnter.
*TabLeave*
TabLeave Just before leaving a tab page. |tab-page|
After WinLeave.
*TabNew*
TabNew When creating a new tab page. |tab-page|
After WinEnter.
Before TabEnter.
*TabNewEntered*
TabNewEntered After entering a new tab page. |tab-page|
After BufEnter.
*TabClosed*
TabClosed After closing a tab page. <afile> expands to
the tab page number.
*TermOpen*
TermOpen When a |terminal| job is starting. Can be
used to configure the terminal buffer.
*TermEnter*
TermEnter After entering |Terminal-mode|.
After TermOpen.
*TermLeave*
TermLeave After leaving |Terminal-mode|.
After TermClose.
*TermClose*
TermClose When a |terminal| job ends.
Sets these |v:event| keys:
status
*TermRequest*
TermRequest When a |:terminal| child process emits an OSC,
DCS, or APC sequence. Sets |v:termrequest|. The
|event-data| is a table with the following
fields:
- sequence: the received sequence
- cursor: (1,0)-indexed, buffer-relative
position of the cursor when the sequence was
received
This is triggered even when inside an
autocommand defined without |autocmd-nested|.
*TermResponse*
TermResponse When Nvim receives an OSC or DCS response from
the host terminal. Sets |v:termresponse|. The
|event-data| is a table with the following fields:
- sequence: the received sequence
This is triggered even when inside an
autocommand defined without |autocmd-nested|.
May be triggered during another event (file
I/O, a shell command, or anything else that
takes time).
Example: >lua
-- Query the terminal palette for the RGB value of color 1
-- (red) using OSC 4
vim.api.nvim_create_autocmd('TermResponse', {
once = true,
callback = function(args)
local resp = args.data.sequence
local r, g, b = resp:match("\027%]4;1;rgb:(%w+)/(%w+)/(%w+)")
end,
})
io.stdout:write("\027]4;1;?\027\\")
<
*TextChanged*
TextChanged After a change was made to the text in the
current buffer in Normal mode. That is after
|b:changedtick| has changed (also when that
happened before the TextChanged autocommand
was defined).
Not triggered when there is typeahead or when
an operator is pending.
Note: Cannot be skipped with `:noautocmd`.
Careful: This is triggered very often, don't
do anything that the user does not expect or
that is slow.
*TextChangedI*
TextChangedI After a change was made to the text in the
current buffer in Insert mode.
Not triggered when the popup menu is visible.
Otherwise the same as TextChanged.
*TextChangedP*
TextChangedP After a change was 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