summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2021-03-28 19:30:41 +0200
committerAlan Pearce2021-03-28 19:59:45 +0200
commitc0810b3bf27f6bc9e1359aa1422d285dc8168985 (patch)
treee0c6dc1a817b4853bcd24959c196850f16f958f0
parente959065e1b42bd5910c4bf25c77711ef43f58c17 (diff)
downloadnixfiles-c0810b3bf27f6bc9e1359aa1422d285dc8168985.tar.lz
nixfiles-c0810b3bf27f6bc9e1359aa1422d285dc8168985.tar.zst
nixfiles-c0810b3bf27f6bc9e1359aa1422d285dc8168985.zip
Emacs: make underscore part of word in c-like modes
-rw-r--r--user/emacs/init.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 21b82342..89ede8e4 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -297,6 +297,10 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   (:states '(normal motion)
            "g s" #'evil-avy-goto-symbol-1))
 
+(add-hook 'c-mode-common-hook
+          ; make b/w/e include underscore as *part* of a word
+          (lambda () (modify-syntax-entry ?_ "w")))
+
 (use-package evil-anzu
   :defer 2
   :after evil)