Using smartparens and web-mode at the same time will complement one extra >

Asked 2 years ago, Updated 2 years ago, 82 views

I am using Emacs 24.4.

Using smartparens and web-mode at the same time may complement one more > when handling erb files.

Specifically, <%= complements one more > as in %>>.
It seems that smartpares complements < when < is entered, and then web-mode complements %= when % された is entered, even if you enter <% to enter spaces.

How do I set this up?

The workaround is to use lines 844 to 847 of web-mode.el.

("erb".("<%".%")
                  ("<%=."%")
                  ("<%#".%")
                  ("<%-."."%")

I can solve this problem by rewriting it, but I would like to know other smart solutions.

emacs elisp erb

2022-09-30 17:52

1 Answers

Read "I want to use smartpares" in web-mode.el-html template editing for emacs.

At the time of writing this answer, you will find out how to define sp-web-mode-is-code-context and configure sp-local-pair.


2022-09-30 17:52

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.