I'm using web-mode
to edit my erb
files. When I type <%
emacs (or web-mode
) adds a closing %>
bracket. But when I type a space after the percent sign (i.e. %
), an additional %>
bracket is added.
I'm using prelude
so there's a clue in prelude-web.el
but I'm not sure how to interpret it. The relevant looking code looks like this:
(sp-with-modes '(web-mode)
(sp-local-pair "%" "%"
:unless '(sp-in-string-p)
:post-handlers '(((lambda (&rest _ignored)
(just-one-space)
(save-excursion (insert " ")))
"SPC" "=" "#")))
(sp-local-pair "<% " " %>" :insert "C-c %")
(sp-local-pair "<%= " " %>" :insert "C-c =")
(sp-local-pair "<%# " " %>" :insert "C-c #")
(sp-local-tag "%" "<% " " %>")
(sp-local-tag "=" "<%= " " %>")
(sp-local-tag "#" "<%# " " %>"))
How do I configure emacs to stop adding these additional characters?