Ugly Quick Reference Guide to EMACS

This document contains a rudimentary set of commands. Refer to the EMACS reference card for a more extensive collection of commands. Also use the help button of your emacs session (if you run X) to obtain more detailed information on commands.

The ^ character stands for the ctrl key on your keyboard. The M character stands for the esc key on your keyboard. It used to stand for the meta key, but they don’t make keyboards with that key anymore.

emacs file To open a file in emacs.

^x^c To leave emacs, saving the current file.

^x^s To save the current file without leaving emacs. Also notice that emacs has an autosave feature.

uparrow or ^p move up a line

downarrow or ^n move down a line

rightarrow or ^f move forward one character

leftarrow or ^b move backwards one character

Mf move to end of string

Mb move to beginning of string

Mv move up a screen

^v move down a screen

^e move to end of line

^a move to beginning of line

M< move to beginning of document

  1. move to end of document

^k kill text from cursor position to end of line (store in buffer)

^y yank back text from buffer, insert in current position. You can kill several lines at a time, they all go into the buffer and can then be yanked back.

^g kill current command

^l recenter text, refresh screen

^s search forward

^r search backwards