20Chapter2 • Working With Editors
For a complete tutorial in using Emacs, from within the application itself, type
^H-t
1
.
This tutorial covers many of the functions that are available within Emacs and takes you step-by-
step through them.
2.2.2Basic Emacs Concepts
Emacs uses several keyboard keys to enter commands into the application. The primary
one is the Meta key. The Meta key is signified by
M-.
The Meta key is generally the
ALT
key
on the keyboard, although it may be the
ESC
key in certain circumstances. If the
ALT
key does
not work, try the
ESC
key. What works will depend on if you are logged in locally, accessing the
console directly or using X-Windows. The
ALT
key is used in the same manner as the
CTRL
key.
When using the
ESC
key, press and release the
ESC
key and then press the next indicated key.
In all cases, typing
^U
may be used in place of the Meta key. Just type and release
^U
and then
type the rest of the key sequence as you would for the
ESC
key.
Entering text into the buffer is accomplished in the default mode simply by typing on the
keyboard. To abort a command that’s currently running or asking for input, type
^G
. This will
return you to the current buffer.
Simple commands can be repeated by prefacing them with the key sequence
ESC #
. By
pressing the escape key and typing any number, the next command that is issued will be repeated
that number of times. For example, typing
ESC 75=
is the same as pressing the equal key 75
times.
To exit Emacs, use the command sequence
^X^C
.
Moving around
In additional to the basic functionality provided by the arrow keys on the keyboard, the
key combinations shown in Table 2-1 may be used to move the pointer one character at a time in
a given direction.
1.The caret symbol denotes a control character. To enter the key combination ^H-t, press and hold the CTRL key,
and then press the ‘H’ key. Release both keys and then press the ‘t’ key.
Table2-1 Simple Movement Commands.
Arrow KeyAlternate Combination
Left Arrow^F
Right Arrow^B
Up Arrow^P
Down Arrow^N
Next Page >>
<< Previous Page
Back to the Table of Contents