all repos — nixfiles @ a9584465c231f8cd7506135793f64d9afcfb9033

System and user configuration, managed by nix and home-manager

Emacs: Pair <% %> in web-mode
Alan Pearce alan.pearce@spotcap.com
Wed, 08 Jun 2016 11:08:05 +0200
commit

a9584465c231f8cd7506135793f64d9afcfb9033

parent

a45524199f496d2c11d495df7a4309639ecbc7f0

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M tag-emacs/emacs.d/init.orgtag-emacs/emacs.d/init.org
@@ -1934,7 +1934,10 @@ web-mode-markup-indent-offset 4                   web-mode-style-padding 0
                   web-mode-script-padding 0
                   web-mode-comment-style 2
-                  web-mode-enable-auto-pairing nil))
+                  web-mode-enable-auto-pairing nil
+                  (with-eval-after-load 'smartparens
+                    (sp-with-modes sp--html-modes
+                      (sp-local-pair "<%" "%>")))))
 #+END_SRC
 
 I derived a mode for twig, in order to use its =mode-hook=.