Questions tagged [smartparens]
52 questions
15
votes
2 answers
How do I jump out of enclosing parentheses?
I'm using spacemacs to edit Python code.
When I type an opening parentheses, the closing parentheses is automatically inserted for me and the cursor is put in the middle for further typing. But: once I am done typing inside the parentheses, I need…

Aviral Goel
- 153
- 1
- 4
12
votes
6 answers
Disable smartparens in spacemacs
The smartparens-mode doesn't suit my style of editing. If I attempt to disable it globally in spacemacs, however, the mode is re-enabled:
(smartparens-global-mode -1)
How do I disable smartparens-mode?

Jeff Bauer
- 861
- 1
- 10
- 22
9
votes
4 answers
Automatically formatting brackets
I'm trying to create a function that places/aligns/indents curly brackets according to Allman-style formatting (for coding in C).
Generally speaking, I am fan of Smartparens' interface available to users for customizing functionality. I've…

iceman
- 1,078
- 1
- 9
- 19
8
votes
2 answers
smartparens insert single versus paired character?
Q: how can I tweak smartparens's decision rules for when to
insert a paired or single character?
smartparens seems to be mostly smart when inserting single
quotes (e.g., in text-mode or org-mode). Hence, it default to
inserting a pair of 's and…

Dan
- 32,584
- 6
- 98
- 168
8
votes
1 answer
Is there a command for tidying trailing parentheses?
When editing lisp code, I often end up with trailing parentheses scattered around (assuming | is point):
(defun example-function ()
(let ((x (+ 1 1)))
(when x
(message x)|
)
))
Are there any convenience commands for fixing…

Wilfred Hughes
- 6,890
- 2
- 29
- 59
7
votes
2 answers
What are the differences between autopair and smartparens?
Both autopair and smartparens provide functionality for inserting matching pairs of delimiters automatically.
How do they differ from each other in practice (if at all)? What are some use cases that are covered by one of these packages but not by…

itsjeyd
- 14,586
- 3
- 58
- 87
6
votes
1 answer
How to disable $ pairing in latex-mode in Spacemacs?
When I click $ I get another matching $ thanks to smartparens. I would like to disable this behavior but keep all other matching pairs like () enabled. I tried adding this to the Spacemacs config but it doesn't work:
(sp-local-pair 'LaTeX-mode "$"…

Guy Gur-Ari
- 201
- 1
- 3
5
votes
2 answers
Detect when a key is rebound to another command
First, some context:
I am in the process of debugging a strange interaction between smartparens and Org Speed Keys:
After editing an .org file for a while, specific speed keys for navigating the outline start to be treated as though they are…

itsjeyd
- 14,586
- 3
- 58
- 87
5
votes
2 answers
Remove extra braces
I have some text like this
This is a {{text}} with { { {some {extra} unneeded {
{and ugly}} braces
}}}.
Is there a way to remove the extra unneeded parenthesis so that the result is
This is a {text} with {some {extra} unneeded
{and ugly} braces…

Tohiko
- 1,589
- 1
- 10
- 22
5
votes
1 answer
Smartparens and web-mode conflict to add extra angular bracket
I am fairly new to customizing my emacs, so please be gentle. I did try to find a solution for this, but all I found was a page on git where someone asked a similar question but (as far as I can tell) never received an answer.
I have both…

Kittenmittons
- 203
- 1
- 6
4
votes
2 answers
Smartparens: do not insert parenthesis pair when point is at the beginning of word
How can I make smartparens not to insert a parenthesis pair when the point is at the beginning of a word? I only want it to insert the opening parenthesis.
This is my setup:
(use-package smartparens-config
:ensure smartparens
:diminish…

NVaughan
- 1,481
- 12
- 27
3
votes
1 answer
smartparens does not work well in orgmode
First, let me say I am new to orgmode and emacs. I am sure I am not providing all the relevant information for the problem, so please let me know what can I add here.
I am using emacs 26.3, and I use spacemacs.
The problem is:
smartparens is not…

bobsacameno
- 171
- 5
3
votes
0 answers
smartparen-latex with delete-selection-mode
In my emacs setup, if I have smartparens-mode enabled with smartparens-latex and I open a latex document, type some text then select it and type any latex special command (such as $, ", \{, etc...) the text gets surrounded by these symbols as…

Tohiko
- 1,589
- 1
- 10
- 22
3
votes
3 answers
How do I turn-off smartparens when using prelude?
I find smartparens awkward. It's easier for me to type the matching paren/quote than to arrow over or C-f over. I want to turn off smartparens everywhere. I'm using prelude though and I can see that prelude turns on smartparens for a variety of the…

Son of the Wai-Pan
- 365
- 1
- 12
3
votes
2 answers
automatically close type parens in C++
Does anybody know of a way or a package that can recognize < and > when occuring in template contexts and automatically writes a > either right after the < or after the selected region when typing a (In other words, that behaves just as normal…

lo tolmencre
- 169
- 6