Questions tagged [electric-pair-mode]

Electric Pair mode, a global minor mode, provides a way to easily insert matching delimiters. Whenever you insert an opening delimiter, the matching closing delimiter is automatically inserted as well, leaving point between the two. To toggle Electric Pair mode, type `M-x electric-pair-mode`.

8 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
1answer
462 views

Electric/smart parentheses: allow wrapping in a nontransient way

I like smart parentheses as much as the next person, but there is one situation in which I often get frustrated. Suppose I have a TeX line reading: Lorem ipsum dolor sit amet Now I wish to \...
1
vote
0answers
54 views

How to mark / cursor inside of curly braces when opening set of curly braces

I am using js2-mode as well as electric-pair-mode and autocomplete. When I create a function using function () { and press enter the second curly brace is made on the next line but my cursor is ...
1
vote
0answers
62 views

Electric pairs, working in Emacs 24.3, but not in 24.4

In 24.3, I have this in my .emacs, and it works: (electric-pair-mode 1) (setq electric-pair-pairs '( (?\" . ?\") (?\{ . ?\}) (?\( . ?\) ) ) Normally I use this in org-mode. All of them worked ...
0
votes
0answers
12 views

Can electric-pair-mode delete the matching pair when it's not adjacent?

For example, if I have (test) and I delete the closing paren then I want the opening one deleted automatically. And vice versa. Can eletric pair mode do this? I see there is an adjacent deletion ...
0
votes
0answers
40 views

Disable pretty entities for empty subscripts and superscripts in Org mode

Is there a way to disable pretty display for empty subscripts and superscripts in Org mode? So "X_{}" wouldn't be prettily displayed, but everything else, e.g. "X_{1}", would be. I ...
0
votes
0answers
27 views

how to add double quotes in strings with single quotes using electric-pair-mode

if i write a double quote in a string with single quotes, i want electric-pair-mode to write another double quote. Example: <?php class test { public function test2() { ...
0
votes
0answers
101 views

electric-pair-mode screws indentation

I have some trouble with my emacs indentation. Since I have enabled electric-pair-mode my indentation is screwed when I use hanging braces. Example (| is my cursor): int main(int argc, char *argv[]) {...
0
votes
1answer
130 views

electric-pair for parentheses does not work in latex-mode

electric pairing for () does not work in latex-mode. I have included regular parentheses () in my electric-pair-pairs list in .emacs. The list also includes [], {}, and "". However, when editing ...