The keyword for all this is autocmd (which is often abbreviated to just au). The usual syntax is
所有这些的关键字就是 autocmd(通常缩写为 au)。
The filename pattern syntax is similar -- but not identical -- to a normal shell pattern (see :help autocmd-patterns for details).
文件名称模式的语法和普通的 shell 模式(详见 :help autocmd-patterns)很相似 —— 但又有所区别。
Any autocmd can be specified with a comma-separated list of event types, in which case the handler will be invoked for any of the events listed.
任何autocmd都可以由一个用逗号分隔的事件类型清单指定,这里所列出来的任一事件都能调用处理器。
应用推荐