Reputation: 2084
I googled for "emacs js.erb" and got nothing valuable, Now I use web-mode for it, but obviously web-mode is not for *.js.erb
:
it can not auto complete the html tag, such as </div>
.
For <% ... %>
, <%= .. %>
and so on, it can not indent them.
For javascript code, it also can not indent them
So I want to ask whether there is other mode especially for *.js.erb
?
Upvotes: 1
Views: 284
Reputation: 506
Yes it can; use web-mode-element-close
, bound to C-c C-e /
by default.
This issue in web-mode
may be of interest to you.
Indentation works for Javascript in web-mode
when it is enclosed within <script>
tag.
Upvotes: 2