about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2023-06-06 16:11:31 +0100
committerDavid Morgan <djm_uk@protonmail.com>2023-06-06 16:11:31 +0100
commitaef1571b9e22fe7b1063b95908c2430ba2ff87dc (patch)
treecf600cf11b5fbd611b252779afd7acead9193e18
parent4926c3d2c0717839e00b89109209d3b864ab2200 (diff)
downloaddotfiles-aef1571b9e22fe7b1063b95908c2430ba2ff87dc.tar.gz
Add sp-mark-to-end-of-sexp
-rw-r--r--.emacs.d/lisp/init-smartparens.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-smartparens.el b/.emacs.d/lisp/init-smartparens.el
index 2f2874d..9fee06f 100644
--- a/.emacs.d/lisp/init-smartparens.el
+++ b/.emacs.d/lisp/init-smartparens.el
@@ -65,6 +65,11 @@ Equivalent to raising then wrapping."
             ((= paren-char ?\{) (sp-wrap-curly))
             ((= paren-char ?\[) (sp-wrap-square))
             (t (error "Not in a list")))))
+  (defun sp-mark-to-end-of-sexp ()
+    "Mark all the way to the end of the current sexp."
+    (interactive)
+    (call-interactively 'set-mark-command)
+    (sp-end-of-sexp))
   (unbind-key "M-?" 'smartparens-mode-map)
   (unbind-key "M-?" 'sp-keymap)
   :bind (:map smartparens-mode-map
@@ -85,6 +90,7 @@ Equivalent to raising then wrapping."
               ("C-S-e" . sp-end-of-sexp)
               ("M-E" . sp-end-of-sexp)
               ("M-R" . kill-around-sexp)
+              ("C-M-S-SPC" . sp-mark-to-end-of-sexp)
               ("C-c C-S-d" . duplicate-sexp-after-point)
               ("C-c M-(" . wrap-round-from-behind)))