editing erb files in WebStrom

Is it possible to embend syntaxis highlighting for ERB (Ruby on Rails views) files in WebStorm?

1
6 comments

No.  You should use JetBrains RubyMine or IntelliJ IDEA.

-1
Avatar
Permanently deleted user

=(
I'm using JavaScripMVC's ejs views ( http://javascriptmvc.com/docs.html#&who=jQuery.EJS - ERB style client templating format) It would be great if JetBrains added a support of it in WebStorm (as it is totaly front end JS solution).

0

Well, you should stated this in the request right from beginning (there's no word about JS but Ruby in your original request)

Please file a feature request into project issue tracker http://youtrack.jetbrains.net/issues/WI

0

As a follow up, I too am using ejs formats embedded in my html and php files.

Digging into it a bit, it seems that PHPStorm does provide decent support provided the file name is set to JSP and it only contains a mix of ejs and html.

EJS format seems to be a subset of jsp.  Basically anything inside <%    ... %> tags can be treated as pure javascript and anything inside <%= %> tags is basically an echo/print

The trick seems to be to get the PHPStorm to look for JSP tags inside of PHP and HTML...  Once it treats those snippets as jsp, everything works quite well.

0

Oh, and at least for my use case, if I can do this with a file extension, that works as well.

IE treat all files with an .ejs.php extension as PHP which can contain JSP embedded in the html.

0

5 years on, yet I couldn't see this feature.

I have opened a new issue. Please merge if duplicate.
https://youtrack.jetbrains.com/issue/WEB-29692

1

Please sign in to leave a comment.