I have to edit a bunch of *.txt files for which I want to define a specific filetype. So, in my vimrc
, I add a
autocmd! BufReadPost bunchOfFiles/*.txt :set ft=bunchOfFilesFT
This reads ftplugin/bunchOfFilesFT.vim
as wanted. The problem is that it also reads ftplugin/text.vim
since there is an according autocmd that was defined in filetype.vim
that comes with a vim installation.
Since my bunchOfFilesFT filetype should be completely independent of the text filetype (despite its suffix), I'd rather have vim not load ftplugin/text.vim
. Is this somehow possible?
ftplugin/text.vim
have aif exists("b:did_ftplugin")
section at the beginning tofinish
early if some ftplugin has already beendid
? And do you setb:did_ftplugin
in yourftplugin/bunchofFilesFT.vim
? – jjaderberg Aug 12 '15 at 8:15