:h new-filetype :
A. If you want to overrule all default file type checks. This works by writing one file for each filetype. The disadvantage is that means there can be many files. The advantage is that you can simply drop this file in the right directory to make it work.
I'm having trouble understanding this paragraph for a long time, what does
one file for each filetype mean here ? Do i need to create a file in ftdetect for every filetype that I want to overrule ?
AFAIK, if i write
.vim/ftdetect/mine.vim like this :
autocmd BufRead,BufNewFile *.vim set filetype=vim_test autocmd BufRead,BufNewFile *.h set filetype=h_test autocmd BufRead,BufNewFile *.cpp set filetype=cpp_test
It affects all
*.cpp, it seems to me that one
mine.vim in ftdetect is sufficient for all filetypes that i want to overrule. What am i missing?