how do i get eclipse to interpret .ejs files as .html?

Khon Lieu picture Khon Lieu · Jun 14, 2012 · Viewed 10.5k times · Source

i recently started on a node project and two of the modules i'm using is express and EJS. but default i usually use eclipse as my IDE, it works well for java and decent for html and javascript. but one problem i'm having is that for .ejs files i get no markup color coding, or any form of code completion. it's basically just a plain file.

does anyone know how i can get eclipse to interpret .ejs files as .html files? i figure it's pretty similar except for the occasional embed tags. or a recommendation for an IDE more well suited to node.js/html/ejs development.

thanks!

Answer

rlegendi picture rlegendi · Jun 14, 2012

For a specific file, try right-click, Open With -> Other... -> HTML editor. You can also set the file association globally under Window -> Preferences -> General -> Editors -> File Associations.

On a Mac, the global setting is under Mac Option -> Preferences and all the same options.