Syntax highlight for .ejs files in vim

lyuba picture lyuba · Jan 4, 2011 · Viewed 13k times · Source

What is the best way to make vim highlight ejs (http://embeddedjs.com/) files? Is it possible to set up html highlight for the file in general and javascript highlight to it's parts inside <% %>? Appreciate your help!

Answer

tomaszkubacki picture tomaszkubacki · Sep 24, 2011

Credits goes to @inkedmn just wanted to point out that html binding works way better, therefore put this in your ~/.vimrc file:

au BufNewFile,BufRead *.ejs set filetype=html