Are there any mnemonics or patterns that make memorizing emacs key combos easier?
+6
A:
Well, the main important ones are: `
- C-k to "
K
ill" a line and C-y to "Y
ank" it back from the kill buffer (aka: clipboard). - C-s to "
S
earch " - C-h for "
H
elp" - C-t "
T
ranspose" two characters. - C-p "
P
revious" line - C-n "
N
ext" line - C-f "
F
orward" char - C-b "
B
ackward" char - C-e "
E
nd" of line - C-a .... a is the beginning of the alphabet, so "
A
beginning" of line
Other than that I mostly use the arrow keys, the mouse, the menus, or a select group of actual commands. The few exceptions to this (eg: macro creation and use) I learned pretty much by muscle-memory.
T.E.D.
2010-04-20 17:46:00
Another very useful one: a "block" in many languages is denoted by {}, M-} and M-{ move forward and backward by blocks.
Justin Smith
2010-04-21 18:31:25
Thanks to Trey for adding the "<kbd>" tags, thus indirectly showing the trick to me.
T.E.D.
2010-04-22 13:33:30
+4
A:
Regarding patterns, yes, there are very obvious patterns that occur all over.
C-f forward-char
M-f forward-word
C-M-f forward-sentence/expression
C-b backward-char
M-b backward-word
C-M-b backward-sentence/expression
The pattern being C- applies to the smallest unit (char), M- applies to the next larger unit (word), and C-M- applies to the largest. For programs the units are chars, words, sexps.
Trey Jackson
2010-04-20 23:28:07