I'm trying to get deletion of pairs (e.g. (), [], \(\), \left(\right), etc.) to work more automatically, but I'm running into problems with each.

If I have electric-pair-mode enabled, I can press backspace after inserting a pair of parentheses/brackets/braces, and the entire pair is deleted. However, electric-pair-mode doesn't seem as robust as the built-in pair completion of AUCTeX, so I'd rather not use it if possible. My problem is that in order to delete a pair with electric-pair-mode disabled, I have to manually delete each item in the pair, rather than it auto-deleting the entire pair. Is it possible to just delete the first item in the pair (whether it's a single character, or something like \left{) and have it delete the whole pair?

  • You ask two questions here. Please move one of them to another post - one question per post, please.
    – Drew
    Jan 17, 2022 at 2:45
  • @Drew My bad. I've fixed it.
    – dperrin
    Jan 17, 2022 at 3:29
  • Thank you...........
    – Drew
    Jan 17, 2022 at 4:49


Your Answer

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

Browse other questions tagged or ask your own question.