From 97f62b0a68db5f4278fb925d27b01972981b5667 Mon Sep 17 00:00:00 2001 From: David Morgan Date: Tue, 12 Oct 2021 06:39:58 +0100 Subject: Add paredit splice sexp wrapper and move sp function to correct place --- .emacs.d/lisp/init-smartparens.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to '.emacs.d/lisp/init-smartparens.el') diff --git a/.emacs.d/lisp/init-smartparens.el b/.emacs.d/lisp/init-smartparens.el index 9e8632e..fa8c122 100644 --- a/.emacs.d/lisp/init-smartparens.el +++ b/.emacs.d/lisp/init-smartparens.el @@ -10,6 +10,9 @@ (sp-hybrid-kill-entire-symbol t) (sp-hybrid-kill-excessive-whitespace t) :config + (defun sp-wrap-double-quotation-marks () + (interactive) + (sp-wrap-with-pair "\"")) ;; https://github.com/syl20bnr/spacemacs/blob/develop/layers/+spacemacs/spacemacs-editing/funcs.el (spacemacs/smart-closing-parenthesis) ;; TODO can make things unbalanced (defun sp-close-round () @@ -41,9 +44,11 @@ (require 'smartparens-config) (sp-use-paredit-bindings) (unbind-key "M-?" 'smartparens-mode-map) - (bind-key "C-M-?" 'sp-convolute-sexp 'smartparens-mode-map) - ;; :bind (:map smartparens-mode-map (")" . sp-close-round)) - ) + :commands sp-local-pair + :bind (:map smartparens-mode-map + ("C-M-?" . sp-convolute-sexp) + ;; (")" . sp-close-round) + ("M-\"" . sp-wrap-double-quotation-marks))) (provide 'init-smartparens) ;;; init-smartparens.el ends here -- cgit 1.4.1-2-gfad0