-->
Previous | Table of Contents | Next |
One of the best features of the emacs editor is that if you ever get stuck or are just plain overwhelmed by it all, help is just a few keystrokes awayand lots of it! If you need a short emacs tutorial, just enter Ctrl+h t. If you need to find out what function a particular key supports, type Ctrl+h k and then press the key. The help option has many different topics. Use Ctrl+h i to load the info documentation reader and read about all the types of help available.
emacs, like the vi editor, has such a rich command set that we can cover only a portion of it in this chapter. Table 16.2 is a summary of the strictly essential commands that you need for basic editing in emacs. The emacs man page should be consulted for a more comprehensive description of the full emacs command set.
Command | What it does |
---|---|
Ctrl+b | Moves back one character |
Ctrl+d | Deletes the current character |
Ctrl+f | Moves forward one character |
Ctrl+g | Cancels the current command |
Ctrl+h | Enters emacs online help |
Ctrl+n | Moves forward to the next line |
Ctrl+p | Moves back to the previous line |
Ctrl+s | Searches forward for a string |
Ctrl+v | Scrolls forward one screen |
META+v | Scrolls backward one screen |
Ctrl+x u | Undoes the last edit |
Ctrl+x Ctrl+c | Exits emacs |
Ctrl+x Ctrl+s | Saves the buffer to a file |
There are many text editors available for the Linux system. Two of the most popular are vi (which is actually an alias to the elvis editor) and emacs. Both provide basic editing functions such as inserting and deleting text, reading and writing of external files, text searching, and copying and moving text. vi is a full-screen editor that has two modes: command mode and text mode. emacs is an extendable and powerful editor that is highly configurable to suit a variety of editing tasks (such as programming, document writing, and changing user or system files). From here, you can find related material to read. To learn more about
Previous | Table of Contents | Next |