`autocmd`s are commands executed automatically on certain events. Questions on creating or modifying `autocmd` definitions are appropriate for this tag.
One of Vim's most powerful features is its ability to run arbitrary commands on certain events for matching files.
event: The set of events on which
autocmdexecution. These include staring to writ a file (
BufWrite), before exiting vim (
pattern: A pattern to match file names for which an
autocmdwill be executed. Patterns can include wildcards, environment variables and special terms for buffer-local action.
command: The command to be executed.