Emacsist RSS --- If never, make it ever: C-h C-h

Emacs 24.4: subword-mode & superword-mode

6587

这里 查看更多 Emacs 相关推荐文章最新 Emacs 圈的动态. 欢迎关注微信公众账号: Emacsist

emacs 24.4 has a superword-mode.

emacs has subword-mode, useful for camelCase. It changes all cursor movement/edit commands to stop in-between the camelCase words.

superword-mode is similar. It treats text like “x_y” as one word. Useful for “snake_case”.

emacs subword-mode superword-mode camelCase snake caseemacs subword-mode, superword-mode

subword-modesuperword-mode are mutally exclusive. Turning one on turns off the other.

To see whether you have subword-mode on, call describe-variable then type “subword-mode”. Same for superword-mode.

To turn it on, just call subword-mode. Call again to turn off.

Or put in emacs init file:

;; move cursor by camelCase
(subword-mode 1) ; 1 for on, 0 for off
原文出处: 李杀
原文地址: http://ergoemacs.org/emacs/emacs_subword-mode_superword-mode.html
原文时间: 2015-08-18 13:09
本文地址: http://emacsist.com/10413
整理时间: 2015-08-19 12:50

本文由 Hick 整理,转载请保留以上信息;
COPYLEFTThe articles on this site come from Internet, thanks to all the original authors.
      If anything about COPYRIGHT, or LEFT, please contact Emacsist at gmail dot com .