views:

84

answers:

2

I'm just beginning to get my way around vim. This is my doubt. How do i set vim's syntax highlighting to treat a file as a html file? I'm using ez template, so the file's extension is .ezt. But a lot of it is normal html code.

+7  A: 
:set syntax=html
Amber
this only works on the currently loaded file...
pbr
+5  A: 

You can also put this into your .vimrc :

au BufLoad *.ezt set syntax=html
Benoit
...this will work automatically, on ALL .ezt files
pbr
E216: No such group or event: BufLoad *.ezt set syntax=html ... what am i doing wrong?
Karthick
used BufReadPost instead. works fine. :)
Karthick