Next: Other Commands, Previous: Hungry Deletion of Whitespace, Up: Commands [Contents][Index]
In spite of the GNU Coding Standards, it is popular to name a symbol by mixing uppercase and lowercase letters, e.g., ‘GtkWidget’, ‘EmacsFrameClass’, or ‘NSGraphicsContext’. Here we call these mixed case symbols nomenclatures. Also, each capitalized (or completely uppercase) part of a nomenclature is called a subword. Here are some examples:
The subword minor mode replaces the basic word oriented movement and editing commands with variants that recognize subwords in a nomenclature and treat them as separate words:
forward-word
c-forward-subword
backward-word
c-backward-subword
mark-word
c-mark-subword
kill-word
c-kill-subword
backward-kill-word
c-backward-kill-subword
transpose-words
c-transpose-subwords
capitalize-word
c-capitalize-subword
upcase-word
c-upcase-subword
downcase-word
c-downcase-subword
Note that if you have changed the key bindings for the word oriented commands in your .emacs or a similar place, the keys you have configured are also used for the corresponding subword oriented commands.
Type C-c C-w to toggle subword mode on and off. To make the mode turn on automatically, put the following code in your .emacs:
(add-hook 'c-mode-common-hook (lambda () (subword-mode 1)))
As a bonus, you can also use subword-mode
in non-CC Mode
buffers by typing M-x subword-mode.
Next: Other Commands, Previous: Hungry Deletion of Whitespace, Up: Commands [Contents][Index]