More in general I'm always in doubt about what's the meaning of the {aupat}
argument of autocmd
for a given {event}
.
From :help :autocmd
I read (my emphasis)
Add {cmd} to the list of commands that Vim will execute automatically on {event} for a file matching {aupat} autocmd-patterns.
So from here it looks like {aupat}
is always used maybe not to match a file name, but more in general to match a file. This kind of makes sense for events like BufWriteCmd
, where {aupat}
truly matching a file name, and FileType
, where it matches the file type of the file.
But there are other events for which there's no such a thing as a file related to it. One example is ColorScheme
, for which
The pattern is matched against the colorscheme name
reading directly from :help ColorScheme
.
But not the documentation of all {event}
s seem to explain what {aupat}
means for them.
For instance, the word pattern doesn't even appear in :help CmdwinLeave
and :help CmdwinEnter
.
Hence the question: what is {aupat}
matched against for {event}
s CmdwinLeave
and CmdwinEnter
?
:help cmdwin-char