I'd like to treat underscores (
_) as word characters everywhere (prog-mode, text, comments, etc.). I'm currently doing so in specific modes, like this:
(add-hook ruby-mode-hook #'ivan-treat-underscore-as-word-char) (defun ivan-treat-underscore-as-word-char () (modify-syntax-entry ?_ "w"))
But I'm not sure how to do the equivalent across the board. Even in ruby-mode, I find that underscores don't behave like word-characters inside strings.