Skip to main content
3 of 3
added 32 characters in body
Nova
  • 1.1k
  • 10
  • 22

The following snippet will make Evil treat an Emacs symbol as a word.

(with-eval-after-load 'evil
    (defalias #'forward-evil-word #'forward-evil-symbol)
    ;; make evil-search-word look for symbol rather than word boundaries
    (setq-default evil-symbol-word-search t))

This has the advantage that it changes depending on the language:

foo-bar

is one symbol in lisp-mode but two symbols (separated by -) in c-mode.

Nova
  • 1.1k
  • 10
  • 22