Is it possible to use HTML snippets with Vim's snipMate plugin in a PHP file without changing the filetype? I'd like to be able to use the HTML snippets in my PHP files because a lot of times I am working in views where I need to use a lot of HTML and PHP. I would like to do it without changing the filetype because that throws off syntax highlighting.
1 Answer
I guess I should have checked SO first... Here is an answer to my question: https://stackoverflow.com/questions/3008575/vim-activiting-html-snippets-on-php-files
You just need to put this in your .vimrc file:
au BufRead *.php set ft=php.html
au BufNewFile *.php set ft=php.html
I think this belongs on SuperUser so I will leave the answer here for anyone else who comes across this.