2

When I type a single {, it will auto insert right }

But when I type a { again, it won't auto insert right }

enter image description here

How can I set up electric-pair-mode so that it always generates matching delimiters and parenthesis?

2
  • What's the question?
    – Drew
    Commented Aug 25, 2023 at 16:34
  • 1
    @Drew I have added the obvious question. Hope that clears up your objection.
    – Tobias
    Commented Aug 26, 2023 at 7:32

1 Answer 1

0

If you want that electric-pair-mode always pairs matching delimiters and parenthesis set electric-pair-inhibit-predicate to the function symbol ignore.

You can do this in a user-friendly way by M-x customize-option RET electric-pair-inhibit-predicate RET. You do not need to type very much if you exploit tab-completion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.