Define a few basic wrapping keybindings
This commit is contained in:
parent
5cc16a8e25
commit
9eca62cd76
2 changed files with 9 additions and 0 deletions
|
@ -110,6 +110,10 @@ Will only occur if prelude-whitespace is also enabled."
|
||||||
|
|
||||||
(show-smartparens-global-mode +1)
|
(show-smartparens-global-mode +1)
|
||||||
|
|
||||||
|
(define-key prog-mode-map (kbd "M-(") (lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "(")))
|
||||||
|
(define-key prog-mode-map (kbd "M-[") (lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "[")))
|
||||||
|
(define-key prog-mode-map (kbd "M-\"") (lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "\"")))
|
||||||
|
|
||||||
;; disable annoying blink-matching-paren
|
;; disable annoying blink-matching-paren
|
||||||
(setq blink-matching-paren nil)
|
(setq blink-matching-paren nil)
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,11 @@
|
||||||
;; Lisp configuration
|
;; Lisp configuration
|
||||||
(define-key read-expression-map (kbd "TAB") 'lisp-complete-symbol)
|
(define-key read-expression-map (kbd "TAB") 'lisp-complete-symbol)
|
||||||
|
|
||||||
|
;; wrap keybindings
|
||||||
|
(define-key lisp-mode-shared-map (kbd "M-(") (lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "(")))
|
||||||
|
(define-key lisp-mode-shared-map (kbd "M-[") (lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "[")))
|
||||||
|
(define-key lisp-mode-shared-map (kbd "M-\"") (lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "\"")))
|
||||||
|
|
||||||
;; a great lisp coding hook
|
;; a great lisp coding hook
|
||||||
(defun prelude-lisp-coding-defaults ()
|
(defun prelude-lisp-coding-defaults ()
|
||||||
(smartparens-strict-mode +1)
|
(smartparens-strict-mode +1)
|
||||||
|
|
Loading…
Reference in a new issue