Emacs: only make / a surround pair in javascript-mode
Alan Pearce alan@alanpearce.eu
Thu, 28 Jan 2021 15:50:24 +0100
1 files 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)))