abelard2008
abelard2008

Reputation: 2084

Is there any mode for Rails' *.js.erb in emacs or I must use TextMate?

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:

  1. it can not auto complete the html tag, such as </div>.

  2. For <% ... %>, <%= .. %> and so on, it can not indent them.

  3. 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

Answers (1)

Jonathan Jin
Jonathan Jin

Reputation: 506

  1. Yes it can; use web-mode-element-close, bound to C-c C-e / by default.

  2. This issue in web-mode may be of interest to you.

  3. Indentation works for Javascript in web-mode when it is enclosed within <script> tag.

Upvotes: 2

Related Questions