If you are an Emacs user, you will find it most useful to think of emacs editing mode as a simplified Emacs with a single, one-line window. All of the basic commands are available for cursor motion, cut and paste, and search.
Emacs-mode uses control keys for the most basic editing functions. If you aren’t familiar with Emacs, you can think of these as extensions of the rudimentary “erase” character (usually backspace or DEL) that Unix provides through its interface to users’ terminals. In fact, emacs-mode figures out what your erase character is and uses that as its delete-backward key. For the sake of consistency, we’ll assume your erase character is DEL from now on; if it is CTRL-H or something else, you will need to make a mental substitution. The most basic control-key commands are shown in Table 2-1.
Table 2-1. Basic emacs-mode commands
|CTRL-B||Move backward one character (without deleting)|
|CTRL-F||Move forward one character|
|DEL||Delete one character backward|
|CTRL-D||Delete one character forward|
|CTRL-Y||Retrieve (“yank”) last item deleted|
Remember that typing CTRL-D when your command line is empty may log you off!
The basic finger habits of emacs-mode are easy to learn, but they do require that you assimilate a couple of concepts that are peculiar to the Emacs editor.
The first of these is the use of CTRL-B and CTRL-F for backward and forward cursor motion. These keys have the advantage of being obvious mnemonics, ...