Next / Previous / Contents / TCC Help System / NM Tech homepage

Abstract

A quick reference guide for the emacs text editor.

This publication is available in Web form and also as a PDF document. Please forward any comments to tcc-doc@nmt.edu.

Table of Contents

1. Starting up
1.1. Definitions
1.2. Conventions used in this document
2. Get me out of here!
3. File commands
4. Cursor movements
5. Deleting text (kill) and putting it back (yank)
6. Other useful stuff
7. Search and destroy
7.1. Incremental search
7.2. Query replace
8. Extended commands

1. Starting up

To edit a file named f, type this command at the Unix prompt:

emacs f

To edit file klarn, for example, and position the cursor initially on the 34th line:

emacs +34 klarn

1.1. Definitions

  • The current cursor position is called point

  • You can also set the mark at any position.

  • The region is the part of the file between point and mark.

1.2. Conventions used in this document

C-Control character: hold down the control key while striking another character. For example, C-x is read as “control-x.”
M-Prefix meta: that is, hold down alt while pressing the other key. You can, instead, press the escape key (esc), then release it and press the other key. For example, there are two ways to go to the previous page (M-v): hold down alt while pressing v, or press esc and then press v.
f1Function key F1