ftdetect/mht.vim

Enforce vim script implementation to reduce ambiguities and improve robustness:

scriptversion 4

Treat MHTML documents as HTML:

" vint: -ProhibitAutocmdWithNoGroup
autocmd BufRead,BufNewFile *.mht setfiletype FALLBACK html
autocmd BufRead,BufNewFile *.mhtml setfiletype html
" vint: +ProhibitAutocmdWithNoGroup

Note

This overrides detection for *.mhtml files as vim will select the mason filetype(which I’ve never seen in the wild).

Note

This is hardly a good interface for editing .mht{,ml} files given that their contents are MIME encoded, but for my use case of a quick edit it works fine.