How to make forward-word, backward-word, treat underscore as part of a word?

后端 未结 3 1853
自闭症患者
自闭症患者 2020-12-03 11:19

In my C# mode, M-b and M-f are bound to {backward,forward}-word.

But these things stop at underscores, which I use sometimes as a prefix on member variables.

3条回答
  •  伪装坚强ぢ
    2020-12-03 11:33

    You don't necessarily have to modify your syntax table. _ belongs to the syntax class symbol in csharp-mode, so you may use forward-symbol instead of forward-word. forward-symbol is in thingatpt, which comes with emacs (at least 23).

    You can btw quickly look at the syntax table of a mode with C-h s (describe-syntax).

提交回复
热议问题