Closed lelutin closed 3 years ago
I'm actually having trouble with this change. .pp files get recognized as pascal
apparently this file is evaluated before the vim-puppet plugin and it jumps on the filetype before us, preventing the plugin to set it to puppet:
/usr/share/vim/vim82/filetype.vim:au BufNewFile,BufRead *.pas,*.pp setf pascal
the problem that I was trying to address here was that I sometimes get the wrong type detected for embedded puppet files -- I've had some show up as "mason" instead for example.
I'll think about it some more and do some testing. I'll report the problem about file type detection with a simple case to reproduce and then we can work better from there.
The effect of the ! after the au keyword is that all autocommands get removed and then this one gets added.
This could potentially hide some other autocommands that would be supplied by other plugins or user scripts that get loaded before this plugin.
As far as I can see, other plugins that set the filetype don't use the ! after au.