An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.
C-M-f | sp-forward-sexp |
C-M-b | sp-backward-sexp |
|
C-M-d | sp-down-sexp |
C-M-u | sp-backward-up-sexp |
|
C-M-a | sp-backward-down-sexp |
C-M-e | sp-up-sexp |
|
I have the following set to make wrapping sexp
s a little easier.
(define-key smartparens-mode-map (kbd "M-(") 'sp-wrap-round)
(define-key smartparens-mode-map (kbd "M-[") 'sp-wrap-square)
(define-key smartparens-mode-map (kbd "M-{") 'sp-wrap-curly)
M-( | sp-wrap-round |
M-[ | sp-wrap-square |
M-{ | sp-wrap-curly |
|
|
M-[delete] | sp-unwrap-sexp |
M-[backspace] | sp-backward-unwrap-sexp |
|
C-[right] | sp-forward-slurp-sexp |
C-[left] | sp-forward-barf-sexp |
C-M-[right] | sp-backward-slurp-sexp |
C-M-[left] | sp-backward-barf-sexp |
|
C-M-[delete] | sp-splice-sexp-killing-forward |
C-M-[backspace] | sp-splice-sexp-killing-backward |
|
Keybinding |
Command |
C-M-f |
sp-forward-sexp |
C-M-f |
sp-backward-exp |
C-M-d |
sp-down-sexp |
C-M-f |
sp-forward-sexp |
C-M-b |
sp-backward-sexp |
C-M-d |
sp-down-sexp |
C-M-a |
sp-backward-down-sexp |
C-S-d |
sp-beginning-of-sexp |
C-S-a |
sp-end-of-sexp |
C-M-e |
sp-up-sexp |
C-M-u |
sp-backward-up-sexp |
C-M-t |
sp-transpose-sexp |
C-M-n |
sp-forward-hybrid-sexp |
C-M-p |
sp-backward-hybrid-sexp |
C-M-k |
sp-kill-sexp |
C-M-w |
sp-copy-sexp |
M-<delete> |
sp-unwrap-sexp |
M-<backspace> |
sp-backward-unwrap-sexp |
C-<right> |
sp-forward-slurp-sexp |
C-<left> |
sp-forward-barf-sexp |
C-M-<left> |
sp-backward-slurp-sexp |
C-M-<right> |
sp-backward-barf-sexp |
M-D |
sp-splice-sexp |
C-M-<del> |
sp-splice-sexp-killing-forward |
C-M-<backspace> |
sp-splice-sexp-killing-backward |
C-S-<backspace> |
sp-splice-sexp-killing-around |
C-] |
sp-select-next-thing-exchange |
C-<left_bracket> |
sp-select-previous-thing |
C-M-] |
sp-select-next-thing |
M-F |
sp-forward-symbol |
M-B |
sp-backward-symbol |