about summary refs log tree commit diff stats
path: root/.emacs.d/lisp/init-smartparens.el
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2021-10-12 06:39:58 +0100
committerDavid Morgan <djm_uk@protonmail.com>2021-10-12 06:39:58 +0100
commit97f62b0a68db5f4278fb925d27b01972981b5667 (patch)
treeef4de68e3e2e256b9d0035a7e16cb76e1966654d /.emacs.d/lisp/init-smartparens.el
parent4d593f4fa05905aa31591238f14f19bc1d034d28 (diff)
downloaddotfiles-97f62b0a68db5f4278fb925d27b01972981b5667.tar.gz
Add paredit splice sexp wrapper and move sp function to correct place
Diffstat (limited to '.emacs.d/lisp/init-smartparens.el')
-rw-r--r--.emacs.d/lisp/init-smartparens.el11
1 files changed, 8 insertions, 3 deletions
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
^
30b5f112 ^
2f82f50a ^
86c1c388 ^
1a3dc91e ^
6dabbbd5 ^

30b5f112 ^
fbc30231 ^

















cd2458c0 ^

0ae975c2 ^

b21edfaa ^
cd2458c0 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77