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?

Drew
  • 75,699
  • 9
  • 109
  • 225
jilen
  • 121
  • 4

1 Answers1

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.

Tobias
  • 32,569
  • 1
  • 34
  • 75