user65663
user65663

Reputation:

Learning emacs - useful mnemonics?

Are there any mnemonics or patterns that make memorizing emacs key combos easier?

Upvotes: 17

Views: 5709

Answers (6)

einjohn
einjohn

Reputation: 497

There is also Spacemacs, an Emacs distribution that introduces completely restructured key sequences, in order to be more mnemonic.

Almost every shortcut is started using SPC, initiating the sequence, followed by more single keys, selecting the context and then the actual command; e.g. SPC  f  s in oder to save a file, or SPC  f  S in oder to save all files.

Other context examples are

  • b for buffer,
  • w for window,
  • s for search, or
  • x for text manipulation and many more.

It seems to be very well structured.

Unfortunately I haven't used it, and I don't know whether you have to use Spacemacs or how easily it can be transplanted from its configuration into your own Emacs configuration.

One more remark: It advertises to be the best of both worlds (Emacs and Vim), but you do not need to use the vim editing-style.

Upvotes: 3

mikeyreilly
mikeyreilly

Reputation: 6923

If I need to remember something like C-c M-j = cider-jack-in, I think of it as Craig Charles and Michael Jackson at a bar, with Craig Charles ordering the first round "cider and jack".

Upvotes: 1

user117529
user117529

Reputation: 673

The most common ones are elaborated in the emacs tutorial -- C-h t. Read it from the beginning, carefully. Even if you don't read it all the way to the end, it should help you remember the rationale behind the most common keys better.

Upvotes: 0

Trey Jackson
Trey Jackson

Reputation: 74470

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.

Upvotes: 19

T.E.D.
T.E.D.

Reputation: 44804

Well, the main important ones are: `

  • C-k to "Kill" a line and C-y to "Yank" it back from the kill buffer (aka: clipboard).
  • C-s to "Search "
  • C-h for "Help"
  • C-t "Transpose" two characters.
  • C-p "Previous" line
  • C-n "Next" line
  • C-f "Forward" char
  • C-b "Backward" char
  • C-e "End" 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.

Upvotes: 20

Yin Zhu
Yin Zhu

Reputation: 17119

Don't memorize it, just USE it.

Upvotes: 2

Related Questions