next up previous
Next: Text files and editors: Up: Introduction to the Linux Previous: Text files and editors:

Text files and editors: emacs and xemacs

The emacs editor, and its cousin xemacs, are powerful text editors which have many extensions to help users edit specific types of file. Unlike vi they do not have different command and edit modes, and anything you type will appear in the document.

In order to enter commands, you will need to use one of two special keys. The first is the `control key', usually found on the bottom left and right of your keyboard and marked with the letters `Ctrl'. We will use the `CTRL' to refer to this key, so for example `CTRL-x' will mean hold down the control key and press x. Linux sometimes uses `$\land$' to refer to the CTRL key, and Emacs itself uses `C' to refer to the control key (though this can get confusing since `C' is quite a common letter!).

The second special key is called the meta-key, and on PCs this is usually the alternate key, marked `Alt' on most keyboards and found next to the spacebar. On some computers they use the escape key as the meta-key instead (marked `Esc' and found on the top-left of the keyboard). Emacs denotes this key `M', we will simply use `ALT', though remember that this might be the escape key instead.

You can have several files open in emacs at once, and emacs refers to these as `buffers'. A buffer is an area of memory the computer sets aside to store something for easy access.

Probably the most important things you need to know to use emacs are:

There are many more emacs commands, and in fact it will do far more than just text editing. The easiest way to get into emacs is to use xemacs which has a set of handy menus at the top and tells you what the equivalent keystrokes are. There are many good resources on the internet for learning emacs.


next up previous
Next: Text files and editors: Up: Introduction to the Linux Previous: Text files and editors:
Phil Hasnip 2007-08-23