Skip to content

Instantly share code, notes, and snippets.

@avescodes
Created October 25, 2012 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avescodes/3954383 to your computer and use it in GitHub Desktop.
Save avescodes/3954383 to your computer and use it in GitHub Desktop.
Paredit FTW
;; Add more parens with wrap! M-(
(+ 1 * 2 3) ; -> (+ 1 (*) 2 3)
;; Slurp
;; To the right with C-right
(+ 1 (*) 2 3) ; -> (+ 1 (* 2) 3)
;; To the left with C-M-left
(+ 1 (*) 2 3) ; -> (+ (1 *) 2 3)
;; and Barf
;; Off the right with C-left
(+ 1 (* 2 3)) ; -> (+ 1 (* 2) 3)
;; Off the left with C-M-right
(+ 1 (* 2 3)) ; -> (+ 1 * (2 3))
;; M-s to splice, dropping a level of indentation
(+ 1 (* 2 3)) ; -> (+ 1 * 2 3)
;; M-up to splice, but deleting backwards from the cursor
(+ 1 (* 2 3)) ; -> (+ 1 2 3)
;; M-down to splice, but deleting forwards from the cursor
(+ 1 (* 2 3)) ; -> (+ 1 * 2)
;; M-S to split
(+ 1 2 3) ; -> (+ 1) (2 3)
;; M-J to join
(+ 1) (2 3) ; -> (+ 1 2 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment