[smartparens] move config from cp-parens to init.org
This commit is contained in:
parent
f06ddeb7a1
commit
d7e5a0988b
26
init.org
26
init.org
|
@ -2572,6 +2572,26 @@ pjb suggested a different approach [[http://paste.lisp.org/display/10157][here]]
|
|||
(smartparens-global-mode)
|
||||
:config
|
||||
(add-to-list 'sp-no-reindent-after-kill-modes 'markdown-mode)
|
||||
;; (sp-pair "(" ")" :trigger-wrap (kbd "M-(") :actions '(insert wrap
|
||||
;; autoskip navigate escape))
|
||||
(sp-pair "(" ")" :wrap "M-(")
|
||||
(sp-pair "[" "]" :wrap "M-[")
|
||||
(sp-pair "\"" "\"" :wrap "M-\"")
|
||||
;; (global-unset-key (kbd "M-\'")) (sp-pair "\'" "\'" :wrap "M-\'")
|
||||
;; ;; buggy
|
||||
(sp-pair "<" ">" :wrap "M-<")
|
||||
(sp-pair "{" "}" :wrap "M-{")
|
||||
;; (sp-pair "\\\\*" "\\\\*" :actions '(wrap)) (sp-pair "\\\\*" :wrap)
|
||||
;; (sp-pair "\\\\/" :wrap)
|
||||
;; Disable inserting pair if preceded by : (e.g. in IRC smileys)
|
||||
(defun cp-point-after-colon-p ()
|
||||
(equal (string (char-before)) ":"))
|
||||
;; (sp-pair "(" nil :unless '(cp-point-after-colon-p))
|
||||
|
||||
;; sp-backward-kill-word and subword-backward-kill conflict
|
||||
;; (define-key emacs-lisp-mode-map (kbd "C-p") 'sp-previous-sexp)
|
||||
;; (define-key emacs-lisp-mode-map (kbd "C-n") 'sp-next-sexp)
|
||||
|
||||
:bind
|
||||
(("M-<up>" . sp-splice-sexp-killing-backward)
|
||||
:map prog-mode-map
|
||||
|
@ -2606,7 +2626,9 @@ pjb suggested a different approach [[http://paste.lisp.org/display/10157][here]]
|
|||
:map emacs-lisp-mode-map
|
||||
(";" . sp-comment))
|
||||
:hook
|
||||
(eval-expression-minibuffer-setup . smartparens-mode))
|
||||
(eval-expression-minibuffer-setup . smartparens-mode)
|
||||
(paredit-mode . turn-off-smartparens-mode)
|
||||
(erc-mode . smartparens-mode))
|
||||
|
||||
#+END_SRC
|
||||
|
||||
|
@ -2926,7 +2948,7 @@ pjb suggested a different approach [[http://paste.lisp.org/display/10157][here]]
|
|||
**
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'cp-hindi)
|
||||
(require 'cp-parens)
|
||||
;; (require 'cp-parens)
|
||||
|
||||
#+END_SRC
|
||||
|
||||
|
|
Loading…
Reference in New Issue