2

Most “core” filetype features are covered by autocommands, so disabling them will have the effect that you want. But we only want to disable them when opening a particular file, so :noautocmd edit {file} I’ll update with more information on the autocommands and features when I get to my laptop.


1

Interesting situation. Let's first address debugging it. It seems your experience with adding a normal iABCDE to the .vim/ftplugin/mail.vim and seeing it twice really suggests this file is being sourced more than once. I think one thing you can try is adding statements that can display where &filetype was set and also show the stack trace of the function ...


1

When in doubt look into the standard Vim runtime files. ts sts et sw should be set by after/ftplugin. sta is basically no-op, as you have &sw == &sts anyway. si ai are basically no-op as you have &cindent on. And also, in general, there's nothing in setting ai si on if you have any meaningful indent/xyz.vim. cino should probably be set by after/...


Only top voted, non community-wiki answers of a minimum length are eligible