Go to the first, previous, next, last section, table of contents.

Vi Mode

This is the Vi command mode. Most keys will work as in Vi. The notable exceptions are:

C-x
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 GNU Emacs Manual.
C-g and C-]
These are the Emacs `quit' keys. I have tried to make VIP use C-c as the quit key, but these keys are harcoded in some places in Emacs for all but the most recent versions. There will be cases where you will have to use C-g to quit. Similarly, C-] is used to exit `Recursive Edits' in Emacs for which there is no comparable VI functionality and no key-binding. Recursive edits are indicated by `[]' brackets framing the modes on the mode line. See section `Recursive Edit' in The GNU Emacs Manual. Besides, C-c is used in Emacs as a general user binding key. Many packages will define key sequences that use C-c. After a little experience, you should either free up C-c, or swap the C-g and C-c keys. See section `Keyboard Translate Table' in GNU Emacs Lisp Reference Manual, to find out how to do this.
Underscore
VIP uses ESC as switch between Insert and Vi modes. Emacs uses ESC for Meta. We need a Meta key to call the Meta key functions such as M-x function name. _ key was chosen, since it is the only reasonable free VI key left. Thus, in Vi mode, to get M-x, you should type _x. It is possible to use ESC as Meta, but then you cannot press ESC multiple times in Vi mode. See section Customization, to find out how to rebind ESC to be Meta.

Other differences are mostly improvements. The ones you should know about are:

`Undo'
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 vip-undo.
`Counts'
Most commands, ~, [[, p, /, ... etc. take counts.
`Regexps'
VIP uses Emacs Regular Expressions for searches. These are a superset of VI regular expressions, excepting the change-of-case escapes `\u', `\L', ... etc. See section `Regular Expressions' in The GNU Emacs Manual, for details. Files specified to :e use csh regular expressions (globbing, wildcards, what have you).
`Ex commands'
The directory of a file is automatically prepended to any :e non-absolute-pathname done from the corresponding buffer. Absolute filenames are required less often in VIP. :cd will change the default directory for the buffer the :cd is issued from. :e will interpret the filename argument by default in csh. See section Customization if you want to change this.:next takes counts from :args, so that :rew is obsolete. Also, :args will show only the undisplayed files. The current file should be visible on the mode line.

See section Improvements over VI for more information.


Go to the first, previous, next, last section, table of contents.