Content #
autocmd一般结构如下:
:autocmd BufNewFile * :write
“BufNewFile” - the event to watch for “*” - a pattern to filter the event “:wrtie” - the command to run
结合buffer-local abbreviation和autocmd:
:autocmd FileType python :iabbrev <buffer> iff if:<left>
:autocmd FileType javascript :iabbrev <buffer> iff if ()<left>
查看所有autocmd事件:
:help autocmd-events