How to force vim to syntax-highlight a file as html?

Viewed 111651

How do I set vim's syntax highlighting to treat a file extension as an html file?

I'm using ez template, so the file's extension is .ezt. But a lot of it is normal html code.

7 Answers

In a .php file (or a html file), you could use a Vim Modeline to force certain commands or settings:

 1 /* vim: syntax=javascript
 2  *
 3  * .submit_norefresh()
 ~
 ~
Related