Basic Insertion Commands

Command Keys Examples
paredit-open-list (
(a b |c d)
    --->
(a b (|) c d)

(foo "bar |baz" quux)
    --->
(foo "bar (|baz" quux)
paredit-close-list-and-newline )
(defun f (x|  ))
    --->
(defun f (x)
  |)
paredit-close-list M-)
(a b |c   )
    --->
(a b c)|

; Hello,| world!
    --->
; Hello,)| world!
paredit-doublequote "
(frob grovel |full lexical)
    --->
(frob grovel "|" full lexical)

(foo "bar |baz" quux)
    --->
(foo "bar \"|baz" quux)
paredit-meta-doublequote M-"
(foo "bar |baz" quux)
    --->
(foo "bar baz"
     |quux)

(foo |(bar #\x "baz \\ quux") zot)
    --->
(foo "|(bar #\\x \"baz \\\\ quux\")" zot)
paredit-backslash \
(string #|)
  ; Escaping character... (x)
    --->
(string #\x|)

"foo|bar"
  ; Escaping character... (")
    --->
"foo\"|bar"
paredit-semicolon ;
|(frob grovel)
    --->
;|
(frob grovel)

(frob grovel)    |
    --->
(frob grovel)    ;|
paredit-comment-dwim M-;
(foo |bar)   ; baz
    --->
(foo bar)                               ; |baz

(frob grovel)|
    --->
(frob grovel)                           ;|

    (foo bar)
|
    (baz quux)
    --->
    (foo bar)
    ;; |
    (baz quux)

    (foo bar) |(baz quux)
    --->
    (foo bar)
    ;; |
    (baz quux)

|(defun hello-world ...)
    --->
;;; |
(defun hello-world ...)
paredit-newline RET
(let ((n (frobbotz))) |(display (+ n 1)
port))
    --->
(let ((n (frobbotz)))
  |(display (+ n 1)
            port))

Deleting & Killing

Command Keys Examples
paredit-forward-delete C-d, deletechar
(quu|x "zot")
    --->
(quu| "zot")

(quux |"zot")
    --->
(quux "|zot")
    --->
(quux "|ot")

(foo (|) bar)
    --->
(foo | bar)

|(foo bar)
    --->
(|foo bar)
paredit-backward-delete DEL
("zot" q|uux)
    --->
("zot" |uux)

("zot"| quux)
    --->
("zot|" quux)
    --->
("zo|" quux)

(foo (|) bar)
    --->
(foo | bar)

(foo bar)|
    --->
(foo bar|)
paredit-kill C-k
(foo bar)|     ; Useless comment!
    --->
(foo bar)|

(|foo bar)     ; Useful comment!
    --->
(|)     ; Useful comment!

|(foo bar)     ; Useless line!
    --->
|

(foo "|bar baz"
     quux)
    --->
(foo "|"
     quux)
paredit-forward-kill-word M-d
|(foo bar)    ; baz
    --->
(| bar)    ; baz
    --->
(|)    ; baz
    --->
()    ;|

;;;| Frobnicate
(defun frobnicate ...)
    --->
;;;|
(defun frobnicate ...)
    --->
;;;
(| frobnicate ...)
paredit-backward-kill-word M-DEL
(foo bar)    ; baz
(quux)|
    --->
(foo bar)    ; baz
(|)
    --->
(foo bar)    ; |
()
    --->
(foo |)    ; 
()
    --->
(|)    ; 
()

Movement & Navigation

Command Keys Examples
paredit-forward C-M-f
(foo |(bar baz) quux)
    --->
(foo (bar baz)| quux)

(foo (bar)|)
    --->
(foo (bar))|
paredit-backward C-M-b
(foo (bar baz)| quux)
    --->
(foo |(bar baz) quux)

(|(foo) bar)
    --->
|((foo) bar)

Depth-Changing Commands

Command Keys Examples
paredit-wrap-sexp M-(
(foo |bar baz)
    --->
(foo (|bar) baz)
paredit-splice-sexp M-s
(foo (bar| baz) quux)
    --->
(foo bar| baz quux)
paredit-splice-sexp-killing-backward M-up, ESC M-O A
(foo (let ((x 5)) |(sqrt n)) bar)
    --->
(foo (sqrt n) bar)
paredit-splice-sexp-killing-forward M-down, ESC M-O B
(a (b c| d e) f)
    --->
(a b c f)
paredit-raise-sexp M-r
(dynamic-wind in (lambda () |body) out)
    --->
(dynamic-wind in |body out)
    --->
|body

Barfage & Slurpage

Command Keys Examples
paredit-forward-slurp-sexp C-), M-right, ESC , ESC M-O C
(foo (bar |baz) quux zot)
    --->
(foo (bar |baz quux) zot)

(a b ((c| d)) e f)
    --->
(a b ((c| d) e) f)
paredit-forward-barf-sexp C-}, M-left, ESC , ESC M-O D
(foo (bar |baz quux) zot)
    --->
(foo (bar |baz) quux zot)
paredit-backward-slurp-sexp C-(, C-M-left, ESC , ESC M-O d
(foo bar (baz| quux) zot)
    --->
(foo (bar baz| quux) zot)

(a b ((c| d)) e f)
    --->
(a (b (c| d)) e f)
paredit-backward-barf-sexp C-{, C-M-right, ESC , ESC M-O c
(foo (bar baz |quux) zot)
    --->
(foo bar (baz |quux) zot)

Miscellaneous Commands

Command Keys Examples
paredit-split-sexp M-S
(hello| world)
    --->
(hello)| (world)

"Hello, |world!"
    --->
"Hello, "| "world!"
paredit-join-sexps M-J
(hello)| (world)
    --->
(hello| world)

"Hello, "| "world!"
    --->
"Hello, |world!"

hello-
|  world
    --->
hello-|world
paredit-recentre-on-sexp C-c C-M-l (no examples)