all repos — nixfiles @ 394c97ecffbd5907619c6fd4c4b9ac8a62ba2288

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

Emacs: only make / a surround pair in javascript-mode

Alan Pearce
commit

394c97ecffbd5907619c6fd4c4b9ac8a62ba2288

parent

192527370d8248daa14ba8cedcb0d7c4369c134a

1 file changed, 3 insertions(+), 2 deletions(-)

jump to
M user/emacs/init.eluser/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)))