The quick and dirty key guide to emacs

Jeremy Sanders

October 2011

Meta is the alt or special meta key (shortened to M).

Moving around

Arrow keys (obvious), ctrl+a - move to start of line, ctrl+e - move to end of line, meta+a - move to beginning of paragraph, meta+e - move to end of para.

meta+f - move forward a word, meta+b - move back word.

home - start of document, end - end of document (though is changed in emacs 21).

Undo

ctrl+_ (ctrl+shift+-).

Saving and loading

ctrl+x, ctrl+f - load a file in, ctrl+x, ctrl+s - save current file, ctrl+x, ctrl+c - exit emacs.

ctrl+x, 5, 2 - open up a new window, ctrl+x, 2 - split window, ctrl+x, 1 - unsplit window.

Searching and replacing

Press ctrl+s, and start typing text to search for (you can press delete if you mess up), position moves to first place text is found, press ctrl+s to move to next.

Press meta+% (or use menu) to search and replace text. Type search text, press enter, type replace text, press enter, press `y' to replace each one or `!' to replace them all.

Copying and pasting

Copying and pasting is either done with the mouse (click left, drag to select. Middle-click to paste), or with the keyboard.

To copy, go to the start of the text you want to copy, press ctrl+space, go to end, press meta+w (or to cut press ctrl+w). To paste into current place use ctrl+y. Previously copied bits of text are kept under `Select and Paste' in the edit menu.

There are also commands for cutting and pasting rectangles (remember those!).

Spell checking

emacs can spell check LATEX documents and plain text. Try menu Tools, Spell Checking, Spell Check Buffer (press space to skip word, number to replace with suggestion, `r' to replace with own, `x' to leave). To check a word, move cursor over it, press meta+$.

Help

emacs has extensive manuals under `Help' (try Help, Manuals, Browse Manuals with Info). Try the emacs tutorial if you want to (ctrl+h, t). emacs is completely customisable and programmable, so you can always write some code to fix something you don't like! emacs is configured with its $\sim$/.emacs file.

Don't!

Care pressing ctrl+w (remember the undo key). Don't try reading your email in emacs unless you understand the consequences!

About this document ...

The quick and dirty key guide to emacs

This document was generated using the LaTeX2HTML translator Version 2008 (1.71)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split 0 -font_size 10pt -no_navigation emacs_quick.tex

The translation was initiated by Jeremy Sanders on 2011-10-02


Jeremy Sanders 2011-10-02