E.g. foo.php.tpl
should be highlighted as PHP, foo.js.erb
as Javascript, foo.py.tmp
as Python...
I would add something like this in ~/.vimrc
au BufEnter,BufRead *.php.tpl set filetype=php
au BufEnter,BufRead *.js.erb set filetype=javascript
au BufEnter,BufRead *.py.tmp set filetype=python
Same as that of @leaf's answer but accounted for BufRead
event also.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With