This is the Vi command mode. When Viper is in Vi state, you will see the sign <V> in the mode line. Most keys will work as in Vi. The notable exceptions are:
C-x is used to invoke Emacs commands, mainly those that do window management. C-x 2 will split a window, C-x 0 will close a window. C-x 1 will close all other windows. C-xb is used to switch buffers in a window, and C-xo to move through windows. These are about the only necessary keystrokes. For the rest, see the GNU Emacs Manual.
For user levels 2 and higher, this key serves as a prefix key for the key sequences used by various major modes. For users at Viper level 1, C-c simply beeps.
|C-g and C-]|
These are the Emacs `
Note: Emacs binds C-\ to a function that offers to change the keyboard input method in the multilingual environment. Viper overrides this binding. However, it is still possible to switch the input method by typing \ C-\ in the Vi command state and C-z \ C-\ in the Insert state. Or you can use the MULE menu in the menubar.
u will undo. Undo can be repeated by the . key. Undo itself
can be undone. Another u will change the direction. The presence
of repeatable undo means that U, undoing lines, is not very
important. Therefore, U also calls
Most commands, ~, [[, p, /, ..., etc., take counts.
Viper uses Emacs Regular Expressions for searches. These are a superset of
expressions, excepting the change-of-case escapes `
The current working directory of a buffer is automatically inserted in the
minibuffer if you type :e then space. Absolute filenames are
required less often in Viper. For path names, Emacs uses a convention that
is slightly different from that of Unix. It is designed to minimize the
need for deleting path names that Emacs provides in its prompts. (This is
usually convenient, but occasionally the prompt may suggest a wrong path
name for you.) If you see a prompt /usr/foo/ and you wish to edit the
file ~/.viper, you don't have to erase the prompt. Instead, simply
continue typing what you need. Emacs will interpret /usr/foo/~/.viper
correctly. Similarly, if the prompt is ~/foo/ and you need to get to
/bar/file, keep typing. Emacs interprets ~/foo//bar/ as
/bar/file, since when it sees `
The command :cd will change the default directory for the
current buffer. The command :e will interpret the
filename argument in
When applicable, Ex commands support file completion and history. This
means that by typing a partial file name and then
Like file names, partially typed Ex commands can be completed by typing
In contrast to :w! foo, if the command were :r foo, the entire command will appear in the history list. This is because having :r alone as a default is meaningless, since this command requires a file argument.
As Vi, Viper's destructive commands can be re-executed by typing `.'. However, in addition, Viper keeps track of the history of such commands. This history can be perused by typing C-c M-p and C-c M-n. Having found the appropriate command, it can be then executed by typing `.'. See Improvements over Vi, for more information.Emacs State States in Viper Insert State