COP4610: Operating Systems & Concurrent Programming up ↑

The Emacs Text Editor

 

If you would like to see a more complete tutorial on Emacs, check the Web. At the time of this writing, the official Emacs documentation was posted at http://www.gnu.org/software/emacs/manual/.

Beware: Emacs key bindings are completely customizable. The key bindings in the table below are so frequently used that they are unlikely to be modified in most installations. However, you need to remember that other particular keys or keystroke combinations may have different effects, depending on the the particular installation you are using and the particular kind of file you are editing. (Unless you override the feature, emacs will usually tries to guess what you are editing from the filename extension, and helpfully switch to an appropriate editing mode.) You can find out the current key bindings, from inside emacs, by the command sequence "M-x describe-bindings".

Remember: if there is anything you think you don't like about emacs, you can change it by defining your own environment in the ".emacs" file of your home directory. For example, you can find key bindings that mimic the vi interface.

Emacs

Starting Up Emacs

Getting your Own Copy of Emacs at Home

Ctrl and Meta Keys

Builtin Emacs Help

A Few Frequently Used Emacs Commands

Basic Commands
C-x C-s Save file to disk
C-x C-c Exit emacs
C-e Move to the end of the line
C-a Move to the beginning of the line
C-x C-f Load a file from disk into emacs
C-i Insert file at cursor
C-x k Kill/delete buffer (Current is default)
C-v Page Down
M-v Page Up
C-k Cut from cursor to end of line
C-y Paste at cursor
C-_ Undo
Advanced Commands
C-SPACE Set mark
C-w Cut from mark to cursor
C-2 Splits screen into two sub screens horizontally
C-1 Reduces sub screens to only 1 
C-o Switch between sub screens
C-s Search for word (forward)
C-r Search for word (backward)
M-% Query Replace
C-c C-g Goto Line
C-c i Ispell (spell check) word
C-c C-i Ispell (spell check) buffer
T. P. Baker. ($Id)