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
If you want to see an example of why emacs is way different from other commands we have shown you, try this: Start emacs , press , and then type hanoi -unix and press . You will see a text-based display of solving of the classic Towers of Hanoi problem. The emacs program is really a complete environment for interacting with your machine, far more than simply a text editor. Remember that to quit, you press and then .