VIP. Node: Important Keys

PREV Numeric Arguments UP Vi Commands NEXT Buffers and Windows

2.2: Important Keys

The keys C-g and C-l are unique in that their associated functions are the same in any of emacs, vi and insert mode.

C-g

Quit. Cancel running or partially typed command (keyboard-quit).

C-l Clear the screen and reprint everything (recenter).

In Emacs many commands are bound to the key strokes that start with C-x, C-c and ESC. These commands can be accessed from vi mode as easily as from emacs mode.

C-x
C-c
ESC

Typing one of these keys have the same effect as typing it in emacs mode. Appropriate command will be executed according as the keys you type after it. You will be in vi mode again after the execution of the command. For instance, if you type ESC < (in vi mode) then the cursor will move to the beginning of the buffer and you will still be in vi mode.

C
X
Typing one of these keys have the effect of typing the corresponding control character in emacs mode. Moreover, if you type an upper-case character following it, that character will also be translated to the corresponding control character. Thus typing X W in vi mode is the same as typing C-x C-w in emacs mode. You will be in vi mode again after the execution of a command.
\ Escape to emacs mode. Hitting the \ key will take you to emacs mode, and you can execute a single Emacs command. After executing the Emacs command you will be in vi mode again. You can give a count before typing \. Thus 5 \ +, as well as \ C-u 5 +, will insert `+++++' before point.

PREV Numeric Arguments UP Vi Commands NEXT Buffers and Windows