Unix for Mac OS X 10.4 Tiger: Visual QuickPro Guide (2nd Edition)

emacsan Editor Without Modes

The emacs editor was invented by Richard M. Stallman, who is better known today as the founder of the Free Software Foundation and the GNU project.

emacs is what's known as a modeless editoryou don't have to switch back and forth between command mode and edit mode. emacs is not quite as widely used as vi , but it is very popular, and even though it's a large application with many features, its basics are actually easier than vi 's.

To start emacs:

To move around in the file:

To change text:

To save changes:

1.

emacs commands use the key. Most commands consist of two (or more) control characters . The save command is , followed immediately by . (That means do not press or any other key between this step and the next one.)

2.

The file is saved.

To quit:

1.

Like the save command, the quit command is a pair of combinations: followed by .

2.

If there are unsaved changes, emacs asks if you want to save ( Figure 6.20 ).

Figure 6.20. If you attempt to quit from emacs with unsaved changes, you will be asked if you want to save.

To save changes, type y ; to abandon changes, type n .

You can find more information about emacs on the man page ( man emacs ), which includes instruction on running an interactive tutorial feature from within the emacs program.

Tip

Категории