Is it possible to fix syntax-table when using :symbol => :value in .html.erb files?

41 views
Skip to first unread message

Gaizka

unread,
Jan 3, 2012, 3:50:29 AM1/3/12
to Rails On Emacs
Hi there!

I'd like to be able to fix it myself, but I don't understand emacs
much.

The problem i am facing is: I am using show-paren mode (great to spot
missing parens), but in .html.erb files, it's usually broken.

If you have this content in your .erb:

<%= render :partial => "test" %>
|--------------------|

show-paren thinks that the first '>' character closes the first '<'.

Therefore, with the cursor in the last '>' character, emacs thinks
there's too many '>', and show-paren displays red as an error.

Is there a way to "fix" this?

Thanks a lot for rinari, it's great for using Rails and Emacs.



Le Wang

unread,
Feb 24, 2012, 8:41:05 AM2/24/12
to Rails On Emacs
"<>" isn't very useful as matching delimiter in HTML any way.

https://gist.github.com/1901000 should solve it.

Gaizka Villate

unread,
Feb 28, 2012, 5:53:42 AM2/28/12
to emacs-o...@googlegroups.com
This works perfectly.

Thanks a lot!!!

-- Gaizka

El día 24/02/12 05:41 -0800, Le Wang escribió:

Reply all
Reply to author
Forward
0 new messages