在.vimrc中添加以下代码:
au BufNewFile,BufRead *.ott set filetype=odt
这会将所有*.ott文件的filetype设置为odt。注意,这不会自动将*.ott文件视为模板文件,也不会更改其实际扩展名。
上一篇:Autocmd-buflocal 对错误的缓冲区的响应
下一篇:autoColumnsDefinitions函数无法加载格式化程序或其他内容。