Questions tagged [paredit]

Paredit is an emacs minor mode for controlled editing of s-expressions.

Paredit keeps parentheses balanced while editing Lisp source code.

65 questions
2
votes
3 answers

Paredit: remove unwanted keybindings

I'm trying ParEdit mode and this is something that it does not the way I'd want: it shadows the original binding for C-M-F and replaces it with C-M-f. I.e. it forwards sexp instead of selecting it :| I couldn't find the place where the bindings are…
user797257
1
vote
1 answer

How to automatically enable paredit mode on all clojure, closurescript and elisp buffers automatically?

I want to enable paredit-mode on all clojure, cljs and elisp buffers by default, which is probably going to happen through the .spacemacs file. This is what I have so far in the user-config function of my .spacemacs: ;; paredit autoload (autoload…
zendevil.eth
  • 974
  • 2
  • 9
  • 28
1
vote
1 answer

paredit keybindings with GUI vs terminal emacs

I'm struggling with this odd behaviour; paredit's commands of interest, namely paredit-forward-slurp-sexp, bound to C-), and paredit-forward-barf-sexp, bound to C-}, as well as their "backwards" counterparts, work in a GUI emacs, but don't work in…
alexakarpov
  • 1,848
  • 2
  • 21
  • 39
1
vote
0 answers

Disable unbalanced brackets

Is it possible to have a "strict paredit" mode in VSCode for dealing with brackets? So one can't delete any single brackets but both of them by splicing only to avoid unbalanced brackets situation.
fl00r
  • 82,987
  • 33
  • 217
  • 237
1
vote
1 answer

Paredit and transpose code blocks

If I have the following s-expression: (if true (this) (that)) And I want: (if true (that) (this)) How does paredit helps to transpose (this) and (that)?
1
vote
0 answers

What does "skip it to the left" mean in Vim?

I'm trying to figure out paredit. I'm seeing this in the documentation: When about to delete a (, ), [, ], or " and there are other characters inside, then just skip it to the left. I have ((blah (blah blah))) and I want (blah…
Chet
  • 18,421
  • 15
  • 69
  • 113
1
vote
2 answers

Emacs - Load ParEdit Mode on Startup

Is there a straightforward way to enable paredit mode by default every time I launch emacs? I have this code in my .emacs: (scroll-bar-mode -1) (tool-bar-mode -1) (menu-bar-mode -1) (show-paren-mode 1) (global-rainbow-delimiters-mode…
user3594595
1
vote
1 answer

when is paredit-close-round's combined nature useful?

paredit-close-round (which is usually bound to close paren) combines two things: C-M-- C-M-u delete some spaces The doc for the function has this simple example: (a b |c ) -> (a b c)| I see why C-M-- C-M-u is useful; it's useful to use before…
Jisang Yoo
  • 3,670
  • 20
  • 31
1
vote
1 answer

Install Paredit vim plugin on Mac OSX

I recently download the paredit plugin for vim on my mac osx. I placed the paredit.vim in my ~/.vim directory. The docs says: When you enter a '(' then a matching ')' is automatically inserted. If needed, spaces before and/or after the '()' pair…
David Williams
  • 8,388
  • 23
  • 83
  • 171
1
vote
4 answers

How to comment out current line in paredit?

I use M-; to comment out current line or comment out a region with mark sets before I meet paredit mode. But in paredit mode, it seems that I can't comment out the current line unless I C-a and insert ; manually or mark the line before I M-; since…
Boris
  • 555
  • 7
  • 22
0
votes
1 answer

Why are paredit keybindings showing incorrect instructions in emacs

I installed paredit in emacs (gui not terminal and no spacemacs or doomemacs, just emacs) and then checked some of the commands and their corresponding key bindings. Ex. paredit-forward-slurp-sexp C- I believe the is the right arrow…
user2517182
  • 1,241
  • 3
  • 15
  • 37
0
votes
0 answers

Prevent Emacs paredit it in clojure (or cider) mode from inserting a space after a single quote when opening brackets

I'm not sure what caused the change, but now my emacs paredit will insert a space after a single quote when opening a new closure. I do not have this issue in elisp. I have not changed my clojure config in months and have nothing custom beyond…
benwiz
  • 2,167
  • 3
  • 22
  • 33
0
votes
1 answer

Paredit ignore comments when closing parens

Often I run into situations like the following while using paredit, with the point at the | in the following snippet where I want to close the dangling paren, eg. (let ((foo 1)| ; blag ) nil) becomes (let ((foo 1)) ; blag nil) after…
Rorschach
  • 31,301
  • 5
  • 78
  • 129
0
votes
1 answer

How to barf double quotes

I've got this as an initial state: "first" second Placing the cursor anywhere within the double quotes and pressing C-→ (in Emacs) gives me: "first second" Is there a "one-click" way to "barf" double quotes (i.e. to get back from the second state…
n1ghtm4n4g3r
  • 6,045
  • 2
  • 14
  • 15
0
votes
1 answer

Editing commands to switch to threading macro in evil-cleverparens/clojure

I've been using emacs/evil/cider for a while and finally want to make the plunge into a paredit like environment. I'm trying evil-cleverparens, though imagine this concept applies to any sexp-editor/mode. Say I have a nested sexp (a (b (c d))) and I…
user12341234
  • 6,573
  • 6
  • 23
  • 48