Emacs: only make / a surround pair in javascript-mode
1 file changed, 3 insertions(+), 2 deletions(-)
jump to
M user/emacs/init.el → user/emacs/init.el
@@ -338,8 +338,9 @@ (use-package evil-surround :after evil :defer 2 :config (progn - (define-and-bind-quoted-text-object "slash" "/" "\\/" "\\/") - (push '(?\/ . ("/" . "/")) evil-surround-pairs-alist) + (add-hook 'javascript-mode-hook (lambda () + (define-and-bind-quoted-text-object "slash" "/" "\\/" "\\/") + (push '(?\/ . ("/" . "/")) evil-surround-pairs-alist))) (global-evil-surround-mode +1)))