Sublime Text 3 Package for EJS formatting

Leonardo Mascarenhas picture Leonardo Mascarenhas · Dec 24, 2014 · Viewed 14.9k times · Source

I'm looking for a package to format my ejs files. I already found "html-css-js prettify" and set "ejs" as an allowed_file_extensions but this didn't work. When I use de default configuration in the other options all expression language broke. When I set "%" in the array "unformatted" all code beside the expression language is ignored.

Do you guys have another ideia or plugin to use with sublimeText 3?

Answer

Todd picture Todd · Apr 25, 2015

I havent had a problem with https://github.com/samholmes/EJS.tmLanguage (though I use Jade over EJS so dont use it as much). You can install it with Sublime Text Package Control, the package is named "EJS".

You may need to swap open .ejs files from "Plain Text" (or whatever your default type is) to "EJS <% and %>".