:help ftdetect vim , .
:
~/.vim/ftdetect, , . myfiletype.vim.
au BufRead,BufNewFile * if expand('<afile>:e') == '' | set ft=myfiletype | end
, vim myfiletype. , , , setfiletype myfiletype set ft=myfiletype.
~/.vim/syntax/myfiletype.vim. vim, . , autocommand myfiletype.
au BufRead,BufNewFile * if expand('<afile>:e') == '' | set ft=html | end
html, html.
share