Emacs Commands


This is a list of Emacs editor commands that can be used to create text documents an a UNIX computer.

The C- means to press the control key. The M- is the alt key. When there is a command issued such as, exit emacs permanently C-x C-c that indicates pressing the Control key with the other key simultaniously.

Starting Emacs

To start Emacs type:

 emacs filename

Leaving Emacs

To suspend Emacs, (the usual way of leaving it)         C-z
Exit Emacs permanently and save                         C-x C-c

Files

Read a file into Emacs C-x C-f Save a file back to disk C-x C-s

Getting Help

The Help system is simple. Type C-h and follow the directions. If you are a first time user, type C-h t for a tutorial. (This page assumes you know the tutorial) Get rid of help window C-x 1 describe a function C-h f get mode specific information C-h m scroll help window Esc C-v

Motion

Cursor motion: backward forward Word M-b M-f Line C-p C-n go to line 'beginning or end' C-a C-e sentence M-a M-e go to buffer beginning 'or end' M-< M->

Killing and Deleting

entity to kill: backward forward character 'delete, not kill' DEL C-d word M-DEL M-d sentence C-x DEL M-k yank back last thing killed C-y replace last yank with previous kill M-y

Case Change

Uppercase word M-u Lowercase word M-l Capitalize word M-c

Spelling Check

Check spelling of current word M-$ Check spelling of entire buffer M-x spell-buffer

Tags

Find tag M- Find occurence of next tag C-u M-

Keyboard Macros

start defining a keyboard macro C-x ( end defining a keyboard macro C-x ) execute last-defined keyboard macro C-x e

Go back to the Main Screen.