next up previous
Next: Tab completion of file Up: emacs Previous: Anatomy of the standard

Standard editing hot keys.

It is said that emacs uses hot keys (key bindings) so extensively, if you hold down the Control key and type your name, each keystroke will do something - whether you like it or not.

It is useful to learn some standard emacs editing ``hot keys'', since they save wrist motion, are used elsewhere in Unix, and are necessary if you find yourself running emacs without the mouse. For example, within the tcsh command interpretor, you can use them to edit a command you are typing.

Some of the menu selections tell you the corresponding hot keys, so you can learn them as you go. But there are lots of useful commands that do not appear in the menu selections.

Here is a list of some common hot keys, all of them invoked by holding down the Control key and typing the letter:

C-d Delete under the cursor
C-k Kill the rest of the line (save in kill ring)
C-y Restore from the kill ring
C-a Go to the beginning of the line
C-e Go to the end of the line
C-f Go forward one space
C-b Go backward one space
C-p Go down one line
C-f Go up one line
In the last two, tcsh moves backwards or forwards in the command history. Here are some others that don't apply to tcsh:
C-x u Undo the last edit
C-g Cancel the current command
C-v Down one page
M-v Up one page
M-< Go to the top of the buffer
M-> Go to the end of the buffer
M-d Delete the next ``word''.
C-x-C-f Edit a file in a new buffer (type its name)
C-x-C-s Save the current buffer
C-x-C-c Exit emacs
The M- stands for the ``meta'' key. On our keyboards it is the key with the diamond just next to the spacebar on either side. That key works like the Control key or Shift key in that you type the letter while holding it down. If that fails, you can use the Esc key, but in that case you don't hold it down. Just hit Esc and then the letter.

The undo command can be repeated to move backwards in the editing history. The undo operations themselves also become part of the editing history, so if after a string of undos and some typing you changed your mind, you can use undo to undo your typing and then reverse the undo's!


next up previous
Next: Tab completion of file Up: emacs Previous: Anatomy of the standard
Carleton DeTar 2009-09-23