Emacs: Fix smartparens in web-mode
Alan Pearce alan.pearce@spotcap.com
Mon, 04 Jul 2016 08:17:30 +0200
1 files changed, 3 insertions(+), 4 deletions(-)
jump to
M tag-emacs/emacs.d/init.org → tag-emacs/emacs.d/init.org
@@ -1960,9 +1960,8 @@ web-mode-script-padding 0 web-mode-comment-style 2 web-mode-enable-auto-pairing nil web-mode-enable-auto-quoting nil) - (with-eval-after-load 'smartparens - (sp-with-modes sp--html-modes - (sp-local-pair "<%" "%>"))))) + (sp-with-modes sp--html-modes + (sp-local-pair "<%" "%>")))) #+END_SRC I derived a mode for twig, in order to use its =mode-hook=. @@ -2241,7 +2240,7 @@ (bind-key "M-<up>" #'sp-splice-sexp-killing-backward smartparens-mode-map) (bind-key "M-<down>" #'sp-splice-sexp-killing-forward smartparens-mode-map) (bind-key "C-M-S-k" #'sp-kill-hybrid-sexp smartparens-mode-map) (bind-key "C-S-<right>" #'sp-slurp-hybrid-sexp smartparens-mode-map) - (sp-with-modes '(web-mode twig-mode) + (sp-with-modes '(twig-mode) (sp-local-pair "{%" "%}") (sp-local-pair "{{" "}}")) (show-smartparens-global-mode t)