emacs Tutorial


emacs is generally easier to pick up than vi, though this is open to debate. For the most part, anything typed in will go into the file at the position the cursor is at. The exception is if one holds down control (abbreviated as Ctrl through the rest of this document), meta (usually alt), or some combination of the two as something is typed in. These allow for commands to be entered. There are tons of commands emacs has built-in, and emacs can even be extended with custom commands, though for the purposes of this tutorial we will not be getting into any of that. Generally, for your purposes, there are only a few commands that are necessary, which are described below. In all these commands, the notation Ctrl-foo means, “Hold down the control key, and type in foo while holding down the control key.” The notation a b means, “Type in 'a' followed by 'b'.”

Common emacs Commands

Moving the Cursor Around

Moving Text Around

Saving Files and Quitting

Useful Complicated Commands


Prepared for Computer Science 64 by Kyle Dewey, with inspiration from a similar vi tutorial by Prof. Diana Franklin.