tags:

views:

301

answers:

3

I am working on a codebase that uses php within .html files. How do I tell VIM to highlight php correctly in .html files without renaming all of my .html to .php?

+2  A: 

Perhaps with :set filetype?

http://vimdoc.sourceforge.net/htmldoc/usr_06.html

Alec
A: 

set filetype=php

Pierre
+3  A: 

Alec led me in the right direction as to what to look for, but I was looking for a hardcoded solution in the vimrc file. I went ahead with this:

augroup filetype
        autocmd BufNewFile,BufRead <Directory Path>/*.html set filetype=php
augroup END

This changes all files within the codebase to php for highlighting

Corey Hart