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.


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.


Basic editing

Moving cursor


Modify text


Window manipulation


Session manipulation

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


Case conversion


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.



For complete guide, see Emacs Text Editor.