How to use Emacs

I love Emacs. Here is a reference to a FAQ.

Some shortcuts

M^ refers to the meta key: often the Alt key or the ^ key pressed simultaneous with the second key.
But you can almost always press your escape key first and then type the second key (sequential) to type the meta key combination. C^ refers to the control key. The Control key and the subsequent key have to be typed simultaneous.
All commands have long names, some have shortcuts.
To set new commands try this:
M^% string RET newstring RET
M^x global-set-key RET C-c g goto-line RET



C^x b RET

selects the most recently selected buffer that is not displayed

C^x C^s

save the File

C^x s

save all Files you have changed


abort executing command

C^x u

undo last command. Repeat until satisfied.


move window to top of the File


move window to the bottom of the File

C^h ?

show what help emacs can give

M^x query-replace RET string1 RET new string2 RET

interactively replaces string1 with string2

C^x C^f /

anonymously ftp's from gatekeeper

Repeat commands

To set a macro you can do:
 Ctrl-x (       (Starts Macro Definition)
 ...           (Type stuff that goes in the macro)
 Ctrl-x )       (Ends   Macro Definition)
And to run the macro: Ctrl-x e
To repeat a command cmd 7 times we use: Ctrl-u 7 (cmd)
So here we indent 100 lines:
Ctrl-x ( Ctrl-a [tab] Ctrl-a Ctrl-n Ctrl-x ) Ctrl-u 99 Ctrl-x e
There's probably a command in emacs to do the same thing, but with the basic idea you can actually do some pretty cool things.


VM is a great mail package.