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
334 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
45 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
61 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
48 views

smart-quotes how to close it on the end of the variable if there is one

I don't know the proper explaination for this so I could not find the answer. It might be already handled but I was not able to configure it correctly. I have tried to integrate electric-pair and ...
0
votes
0answers
15 views

Electric pair delete with text between?

Suppose I have the piece of text (hello world). How can electric pair be made to work such that deleting the opening parenthesis automatically deletes the closing parenthesis? Some examples (the ...
0
votes
0answers
56 views

c-electric-brace and smartparens pairs

Within c-mode it is possible to configure a style and with c-hanging-braces-alist it is possible to relocate braces like { and } to separate lines, inserting whitespace and so on. Th function which ...
0
votes
0answers
46 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
0answers
40 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 ...