Emacs: Move Cursor by camelCase, snake_case
someThing▮ some▮-thing some▮_thing
some▮Thing some▮-thing some▮_thing
someThing▮ some-thing▮ some_thing▮
subword-mode. It change all cursor movement/edit commands to stop in-between the “camelCase” words.
superword-mode (emacs 24.4) is similar. It treats text like “x_y” as one word. Useful for “snake_case”.
superword-mode are mutally exclusive. Turning one on turns off the other.
To turn them on globally, put this in your emacs init file:
;; move cursor by camelCase (global-subword-mode 1) ;; 1 for on, 0 for off
Subword mode is new in Emacs 23.2. [see Emacs 23.2 Features (released 2010-05)]