Emacs Text Editor for UNIX Quick Reference Guide


Table of contents

What is Emacs?

Emacs is a free text editor designed for programmers. With Emacs, you can edit code in common programming languages with context sensitive indentation and layouts. The following basic guide to Emacs can help you get started with this versatile program.

Basic keystrokes

Control keys

Hold 'Contol' (Ctrl) key down while pressing another key. Noted as 'C-'. For example: C-a (control-a goes to beginning of the line.)

Meta keys

Press the 'Escape' (Esc) key down and release, then press another key. Noted as 'M-'. For example: M-> (Esc-> goes to end of file (EOF).) The Meta key can also be used to prefix a command with the number of times you wish that command executed. See examples for C-f and C-b below.

Top

General terms

Point - Where the cursor currently is positioned in the editing session; usually where the cursor is.
Mark - Placeholder for a position (point) in the file; many commands affect the region between the mark and the point.
Region - The area between the point and the mark (or between the mark & the point).
TOF - Top of file.
EOF - End of file.
RET - Return (or Enter) key.

Top

Basic editing

Moving cursor

Search

Modify text

Top

Window manipulation

Top

Session manipulation

Display buffer menu: M-x buffer-menu (navigate with arrow keys; select buffer with Enter key)

Top

Case conversion

Top

Quitting Emacs

C-x C-c - If buffer has been modified since the last save, you will be prompted to write to the filename prior to exiting.

Top

Resources

For complete guide, see Emacs Text Editor.

Top