Skip to content

Commit

Permalink
Merge pull request #891 from raxod502/feat/more-paredit-bindings
Browse files Browse the repository at this point in the history
Add more entries to sp-paredit-bindings
  • Loading branch information
Fuco1 authored May 30, 2018
2 parents 40f13c3 + 7c8b37d commit 84f20e0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions smartparens.el
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ function will be considered."
("M-<up>" . sp-splice-sexp-killing-backward)
("M-<down>" . sp-splice-sexp-killing-forward)
("M-r" . sp-splice-sexp-killing-around)
("M-(" . sp-wrap-round)
("C-)" . sp-forward-slurp-sexp) ;; barf/slurp
("C-<right>" . sp-forward-slurp-sexp)
("C-}" . sp-forward-barf-sexp)
Expand All @@ -262,6 +263,8 @@ function will be considered."
("C-{" . sp-backward-barf-sexp)
("C-M-<right>" . sp-backward-barf-sexp)
("M-S" . sp-split-sexp) ;; misc
("M-j" . sp-join-sexp)
("M-?" . sp-convolute-sexp)
)
"Paredit inspired bindings.

Expand Down Expand Up @@ -9145,6 +9148,21 @@ comment."
(forward-line 1)
(indent-according-to-mode))))))))

(defun sp-wrap-round ()
"Wrap following sexp in round parentheses."
(interactive)
(sp-wrap-with-pair "("))

(defun sp-wrap-square ()
"Wrap following sexp in square brackets."
(interactive)
(sp-wrap-with-pair "["))

(defun sp-wrap-curly ()
"Wrap following sexp in curly braces."
(interactive)
(sp-wrap-with-pair "{"))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; show-smartparens-mode
Expand Down

0 comments on commit 84f20e0

Please sign in to comment.