In patch 8.0.1206, Vim has added 2 new events: CmdlineEnter
and CmdlineLeave
. They are fired every time you enter or leave a command line.
There are 7 types of command lines, including one for normal Ex commands, debug mode commands, search commands
(with a distinction between forward and backward), expressions, and inputs (more info at :h cmdwin-char
).
Each of them is associated with a symbol among this set : > / ? = @ -
.
You can limit the effect of an autocmd listening to CmdlineEnter
/ CmdlineLeave
to one or several types of command lines by: