htmlsyntax-highlightingvim

How to force Vim to syntax-highlight a file as HTML?


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.


Solution

  • You can also put this into your .vimrc:

    au BufReadPost *.ezt set syntax=html