| [Top] | [Contents] | [Index] | [ ? ] |
VIP is a Vi emulating package written in Emacs Lisp. VIP implements most Vi commands including Ex commands. It is therefore hoped that this package will enable you to do Vi style editing under the powerful GNU Emacs environment. This info file describes the usage of VIP assuming that you are fairly accustomed to Vi but not so much with Emacs. Also we will concentrate mainly on differences from Vi, especially features unique to VIP.
It is recommended that you read nodes on survey and on customization before you start using VIP. Other nodes may be visited as needed.
Comments and bug reports are welcome. Please send messages to
ms@Sail.Stanford.Edu if you are outside of Japan and to
masahiko@sato.riec.tohoku.junet if you are in Japan.
1. A Survey of VIP A survey of VIP. 2. Vi Commands Details of Vi commands. 3. Ex Commands Details of Ex commands. 4. Customization How to customize VIP.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In this chapter we describe basics of VIP with emphasis on the features not found in Vi and on how to use VIP under GNU Emacs.
1.1 Basic Concepts Basic concepts in Emacs. 1.2 Loading VIP How to load VIP automatically. 1.3 Modes in VIP VIP has three modes, which are orthogonal to modes in Emacs. 1.4 Differences from Vi Differences of VIP from Vi is explained.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
We begin by explaining some basic concepts of Emacs. These concepts are explained in more detail in the GNU Emacs Manual.
Conceptually, a buffer is just a string of ASCII characters and two special characters PNT (point) and MRK (mark) such that the character PNT occurs exactly once and MRK occurs at most once. The text of a buffer is obtained by deleting the occurrences of PNT and MRK. If, in a buffer, there is a character following PNT then we say that point is looking at the character; otherwise we say that point is at the end of buffer. PNT and MRK are used to indicate positions in a buffer and they are not part of the text of the buffer. If a buffer contains a MRK then the text between MRK and PNT is called the region of the buffer.
Emacs provides (multiple) windows on the screen, and you can see the content of a buffer through the window associated with the buffer. The cursor of the screen is always positioned on the character after PNT.
A keymap is a table that records the bindings between characters and command functions. There is the global keymap common to all the buffers. Each buffer has its local keymap that determines the mode of the buffer. Local keymap overrides global keymap, so that if a function is bound to some key in the local keymap then that function will be executed when you type the key. If no function is bound to a key in the local map, however, the function bound to the key in the global map becomes in effect.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The recommended way to load VIP automatically is to include the line:
(load "vip") |
(setq term-setup-hook 'vip-mode) |
Even if your `.emacs' file does not contain any of the above lines, you can load VIP and enter vi mode by typing the following from within Emacs.
M-x vip-mode |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Loading VIP has the effect of globally binding C-z (Control-z)
to the function vip-change-mode-to-vi. The default binding of C-z
in GNU Emacs is suspend-emacs, but, you can also call
suspend-emacs by typing C-x C-z. Other than this, all the
key bindings of Emacs remain the same after loading VIP.
Now, if you hit C-z, the function vip-change-mode-to-vi will be
called and you will be in vi mode. (Some major modes may locally bind
C-z to some special functions. In such cases, you can call
vip-change-mode-to-vi by execute-extended-command which is
invoked by M-x. Here M-x means Meta-x, and if your
terminal does not have a META key you can enter it by typing
ESC x. The same effect can also be achieve by typing
M-x vip-mode.)
You can observe the change of mode by looking at the mode line. For instance, if the mode line is:
-----Emacs: *scratch* (Lisp Interaction)----All------------ |
-----Vi: *scratch* (Lisp Interaction)----All------------ |
You can go back to the original emacs mode by typing C-z in vi mode. Thus C-z toggles between these two modes.
Note that modes in VIP exist orthogonally to modes in Emacs. This means that you can be in vi mode and at the same time, say, shell mode.
Vi mode corresponds to Vi's command mode. From vi mode you can enter insert mode (which corresponds to Vi's insert mode) by usual Vi command keys like i, a, o ... etc.
In insert mode, the mode line will look like this:
-----Insert *scratch* (Lisp Interaction)----All------------ |
That VIP has three modes may seem very complicated, but in fact it is not so. VIP is implemented so that you can do most editing remaining only in the two modes for Vi (that is vi mode and insert mode).
The figure below shows the transition of three modes in VIP.
=== C-z ==> == i,o ... ==>
emacs mode vi mode insert mode
<== X-z === <=== ESC ====
|
1.3.1 Emacs Mode This is the mode you should know better. 1.3.2 Vi Mode Vi commands are executed in this mode. 1.3.3 Insert Mode You can enter text, and also can do editing if you know enough Emacs commands.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You will be in this mode just after you loaded VIP. You can do all
normal Emacs editing in this mode. Note that the key C-z is globally
bound to vip-change-mode-to-vi. So, if you type C-z in this mode
then you will be in vi mode.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This mode corresponds to Vi's command mode. Most Vi commands work as they do in Vi. You can go back to emacs mode by typing C-z. You can enter insert mode, just as in Vi, by typing i, a etc.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The key bindings in this mode is the same as in the emacs mode except for the following 4 keys. So, you can move around in the buffer and change its content while you are in insert mode.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The major differences from Vi are explained below.
1.4.1 Undoing You can undo more in VIP. 1.4.2 Changing Commands for changing the text. 1.4.3 Searching Search commands. 1.4.4 z Command You can now use zH, zM and zL as well as z- etc. 1.4.5 Counts Some Vi commands which do not accept a count now accept one. 1.4.6 Marking You can now mark the current point, beginning of the buffer etc. 1.4.7 Region Commands You can now give a region as an argument for delete commands etc. 1.4.8 Some New Commands Some new commands not available in Vi are added. 1.4.9 New Key Bindings Bindings of some keys are changed for the convenience of editing under Emacs. 1.4.10 Window Commands Commands for moving among windows etc. 1.4.11 Buffer Commands Commands for selecting buffers etc. 1.4.12 File Commands Commands for visiting files etc. 1.4.13 Miscellaneous Commands Other useful commands.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can repeat undoing by the . key. So, u will undo a single change, while u . . ., for instance, will undo 4 previous changes. Undo is undoable as in Vi. So the content of the buffer will be the same before and after u u.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Some commands which change a small number of characters are executed slightly differently. Thus, if point is at the beginning of a word `foo' and you wished to change it to `bar' by typing c w, then VIP will prompt you for a new word in the minibuffer by the prompt `foo => '. You can then enter `bar' followed by RET or ESC to complete the command. Before you enter RET or ESC you can abort the command by typing C-g. In general, you can abort a partially formed command by typing C-g.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
As in Vi, searching is done by / and ?. The string will be
searched literally by default. To invoke a regular expression search,
first execute the search command / (or ?) with empty search
string. (I.e, type / followed by RET.)
A search for empty string will toggle the search mode between vanilla
search and regular expression search. You cannot give an offset to the
search string. (It is a limitation.) By default, search will wrap around
the buffer as in Vi. You can change this by rebinding the variable
vip-search-wrap-around. See section 4. Customization, for how to do this.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For those of you who cannot remember which of z followed by RET, . and - do what. You can also use z followed by H, M and L to place the current line in the Home (Middle, and Last) line of the window.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Some Vi commands which do not accept a count now accept one
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Typing an m followed by a lower case character ch marks the point to the register named ch as in Vi. In addition to these, we have following key bindings for marking.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Vi operators like d, c etc. are usually used in combination with motion commands. It is now possible to use current region as the argument to these operators. (A region is a part of buffer delimited by point and mark.) The key r is used for this purpose. Thus d r will delete the current region. If R is used instead of r the region will first be enlarged so that it will become the smallest region containing the original region and consisting of whole lines. Thus m . d R will have the same effect as d d.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Note that the keys below (except for R) are not used in Vi.
downcase-region).
upcase-region).
vip-global-execute).vip-quote-region).
spell-region).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In VIP the meanings of some keys are entirely different from Vi. These key bindings are done deliberately in the hope that editing under Emacs will become easier. It is however possible to rebind these keys to functions which behave similarly as in Vi. See section 4.2 Customizing Key Bindings, for details.
In addition to these, ctl-x-map is slightly modified:
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In this and following subsections, we give a summary of key bindings for basic functions related to windows, buffers and files.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
vip-switch-to-buffer).
vip-switch-to-buffer-other-window).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Insert specified file at point.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This chapter describes Vi commands other than Ex commands implemented in VIP. Except for the last section which discusses insert mode, all the commands described in this chapter are to be used in vi mode.
2.1 Numeric Arguments Many commands accept numeric arguments 2.2 Important Keys Some very important keys. 2.3 Buffers and Windows Commands for handling buffers and windows. 2.4 Files Commands for handling files. 2.5 Viewing the Buffer How you can view the current buffer. 2.6 Mark Commands Marking positions in a buffer. 2.7 Motion Commands Commands for moving point. 2.8 Searching and Replacing Commands for searching and replacing. 2.9 Modifying Commands Commands for modifying the buffer. 2.10 Other Vi Commands Miscellaneous Commands. 2.11 Insert Mode Commands for entering insert mode.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Most Vi commands accept a numeric argument which can be supplied as a prefix to the commands. A numeric argument is also called a count. In many cases, if a count is given, the command is executed that many times. For instance, 5 d d deletes 5 lines while simple d d deletes a line. In this manual the metavariable n will denote a count.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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.
keyboard-quit).
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.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In Emacs the text you edit is stored in a buffer. See GNU Emacs Manual, for details. There is always one selected buffer which is called the current buffer.
You can see the contents of buffers through windows created by Emacs. When you have multiple windows on the screen only one of them is selected. Each buffer has a unique name, and each window has a mode line which shows the name of the buffer associated with the window and other information about the status of the buffer. You can change the format of the mode line, but normally if you see `**' at the beginning of a mode line it means that the buffer is modified. If you write out the content of the buffer to a file, then the buffer will become not modified. Also if you see `%%' at the beginning of the mode line, it means that the file associated with the buffer is write protected.
We have the following commands related to windows and buffers.
vip-next-window).
delete-other-windows).
split-window-vertically).
vip-switch-to-buffer).
vip-switch-to-buffer-other-window).
vip-kill-buffer).
list-buffers).
As buffer name completion is provided, you have only to type in initial substring of the buffer name which is sufficient to identify it among names of existing buffers. After that, if you hit TAB the rest of the buffer name will be supplied by the system, and you can confirm it by RET. The default buffer name to switch to will also be prompted, and you can select it by giving a simple RET. See GNU Emacs Manual for details of completion.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
We have the following commands related to files. They are used to visit, save and insert files.
vip-find-file).
vip-find-file-other-window).
In Emacs, you can edit a file by visiting it. If you wish to visit a file in the current window, you can just type v. Emacs maintains the default directory which is specific to each buffer. Suppose, for instance, that the default directory of the current buffer is `/usr/masahiko/lisp/'. Then you will get the following prompt in the minibuffer.
visit file: /usr/masahiko/lisp/ |
Use V instead of v, if you wish to visit a file in another window.
You can verify which file you are editing by typing g. (You can also type X B to get nformation on other buffers too.) If you type g you will get an information like below in the echo area:
"/usr/masahiko/man/vip.texinfo" line 921 of 1949 |
After you edited the buffer (`vip.texinfo', in our example) for a while, you may wish to save it in a file. If you wish to save it in the file associated with the buffer (`/usr/masahiko/man/vip.texinfo', in this case), you can just say X S. If you wish to save it in another file, you can type X W. You will then get a similar prompt as you get for v, to which you can enter the file name.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In this and next section we discuss commands for moving around in the buffer. These command do not change the content of the buffer. The following commands are useful for viewing the content of the current buffer.
vip-scroll).
vip-scroll-back).
vip-scroll-down).
vip-scroll-up).
vip-scroll-down-one).
vip-scroll-up-one).
The following commands reposition point in the window.
vip-line-to-top).
vip-line-to-middle).
vip-line-to-bottom).
recenter).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following commands are used to mark positions in the buffer.
Emacs uses the mark ring to store marked positions. The commands m <, m > and m . not only set mark but also add it as the latest element of the mark ring (replacing the oldest one). By repeating the command `m ,' you can visit older and older marked positions. You will eventually be in a loop as the mark ring is a ring.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Commands for moving around in the current buffer are collected here. These commands are used as an `argument' for the delete, change and yank commands to be described in the next section.
vip-backward-char).
vip-forward-char).
vip-next-line).
vip-next-line).
vip-next-line-at-bol).
vip-previous-line-at-bol).
vip-beginning-of-line).
vip-bol-and-skip-white).
vip-goto-eol).
vip-goto-col).
vip-forward-word).
vip-forward-Word).
vip-backward-word).
vip-forward-Word).
vip-end-of-word).
vip-end-of-Word).
vip-window-top).
vip-window-middle).
vip-window-bottom).
vip-backward-sentence).
vip-forward-sentence).
vip-backward-paragraph).
vip-forward-paragraph).
vip-goto-line).
vip-goto-mark).
vip-goto-mark-and-skip-white).
vip-paren-match).
The following commands are useful for moving points on the line. A count will repeat the effect.
vip-find-char-forward).
vip-find-char-backward).
vip-goto-char-forward).
vip-goto-char-backward).
vip-repeat-find).
vip-repeat-find-opposite).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Following commands are available for searching and replacing.
vip-re-search has value
t then regular expression search is done and the string
matching the regular expression string is found. If you give an
empty string as string then the search mode will change from vanilla
search to regular expression search and vice versa
(vip-search-forward).
vip-search-backward).
vip-search-next).
vip-search-Next).
isearch-forward).
isearch-backward).
vip-replace-string).
vip-query-replace).
vip-replace-char).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In this section, commands for modifying the content of a buffer are described. These commands affect the region determined by a motion command which is given to the commands as their argument.
We classify motion commands into point commands and line commands. The point commands are as follows:
h, l, 0, ^, $, w, W, b, B, e, E, (, ), /, ?, `, f, F, t, T, %, ;, , |
j, k, +, -, H, M, L, {, }, G, '
|
2.9.1 Delete Commands Commands for deleting text. 2.9.2 Yank Commands Commands for yanking text in Vi's sense. 2.9.3 Put Back Commands Commands for putting back deleted/yanked text. 2.9.4 Change Commands Commands for changing text. 2.9.5 Repeating and Undoing Modifications
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
It is also possible to save the deleted text into a register you specify. For example, you can say " t 3 d w to delete three words and save it to register t. The name of a register is a lower case letter between a and z. If you give an upper case letter as an argument to a delete command, then the deleted text will be appended to the content of the register having the corresponding lower case letter as its name. So, " T d w will delete a word and append it to register t. Other modifying commands also accept a register name as their argument, and we will not repeat similar explanations.
We have more delete commands as below.
vip-kill-line).
vip-delete-char).
vip-delete-backward-char).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Yank commands yank a text of buffer into a (usually anonymous) register. Here the word `yank' is used in Vi's sense. Thus yank commands do not alter the content of the buffer, and useful only in combination with commands that put back the yanked text into the buffer.
Use the following command to yank consecutive lines of text.
vip-yank-line).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
vip-put-back).
vip-Put-back).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Most commonly used change command takes the following form.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
VIP records the previous modifying command, so that it is easy to repeat it. It is also very easy to undo changes made by modifying commands.
vip-undo).
vip-repeat).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Miscellaneous Vi commands are collected here.
save-buffers-kill-emacs).
vip-command-argument).
vip-join-lines).
vip-command-argument).
vip-command-argument).
vip-command-argument).
The following keys are reserved for future extensions, and currently
assigned to a function that just beeps (vip-nil).
&, @, U, [, ], _, q, ~ |
VIP uses a special local keymap to interpret key strokes you enter in vi mode. The following keys are bound to nil in the keymap. Therefore, these keys are interpreted by the global keymap of Emacs. We give below a short description of the functions bound to these keys in the global keymap. See GNU Emacs Manual for details.
set-mark-command).
indent-for-tab-command).
newline-and-indent).
kill-line).
recenter).
previous-line).
quoted-insert).
isearch-backward).
isearch-forward).
transpose-chars).
scroll-up).
kill-region).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can enter insert mode by one of the following commands. In addition to
these, you will enter insert mode if you give a change command with a line
command as the motion command. Insert commands are also modifying commands
and you can repeat them by the repeat command . (vip-repeat).
vip-insert).
vip-Insert).
vip-append).
vip-Append).
vip-open-line).
vip-Open-line).
vip-open-line-at-point).
Insert mode is almost like emacs mode. Only the following 4 keys behave differently from emacs mode.
vip-change-mode-to-vi).
delete-backward-char).
vip-delete-backward-word).
vip-ESC).
help-command if you like.
(See section 4.2 Customizing Key Bindings, for details.) Binding C-h to
help-command has the effect of making the meaning of C-h
uniform among emacs, vi and insert modes.
When you enter insert mode, VIP records point as the start point of insertion, and when you leave insert mode the region between point and start point is saved for later use by repeat command etc. Therefore, repeat command will not really repeat insertion if you move point by emacs commands while in insert mode.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In vi mode, you can execute an Ex command ex-command by typing:
: ex-command RET |
address command ! parameters count flags |
In the current version of VIP, searching by Ex commands is always magic. That is, search patterns are always treated as regular expressions. For example, a typical forward search would be invoked by :/pat/. If you wish to include `/' as part of pat you must preceded it by `\'. VIP strips off these \'s before / and the resulting pat becomes the actual search pattern. Emacs provides a different and richer class or regular expressions than Vi/Ex, and VIP uses Emacs' regular expressions. See GNU Emacs Manual for details of regular expressions.
Several Ex commands can be entered in a line by separating them by a pipe character `|'.
3.1 Ex Command Reference Explain all the Ex commands available in VIP.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Most command names can and preferably be given in abbreviated forms. In the following, optional parts of command names will be enclosed in brackets. For example, `co[py]' will mean that copy command can be give as `co' or `cop' or `copy'.
If command is empty, point will move to the beginning of the line specified by the address. If address is also empty, point will move to the beginning of the current line.
Some commands accept flags which are one of p, l and #. If flags are given, the text affected by the commands will be displayed on a temporary window, and you will be asked to hit return to continue. In this way, you can see the text affected by the commands before the commands will be executed. If you hit C-g instead of RET then the commands will be aborted. Note that the meaning of flags is different in VIP from that in Vi/Ex.
vip-shift-width
(default value is 8) determines the amount of shift.
vip-shift-width
(default value is 8) determines the amount of shift.
The following Ex commands are available in Vi, but not implemented in VIP.
abbreviate, list, next, print, preserve, recover, rewind, source, unabbreviate, xit, z |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you have a file called `.vip' in your home directory, then it will also be loaded when VIP is loaded. This file is thus useful for customizing VIP.
4.1 Customizing Constants How to change values of constants. 4.2 Customizing Key Bindings How to change key bindings.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
vip-shift-width 8
vip-re-replace nil
t then do regexp replace, if nil then do string replace.
vip-search-wrap-around t
t, search wraps around the buffer.
vip-re-search nil
t then search is reg-exp search, if nil then vanilla
search.
vip-case-fold-search nil
t search ignores cases.
vip-re-query-replace nil
t then do reg-exp replace in query replace.
vip-open-with-indent nil
t then indent to the previous current line when open a new line
by o or O command.
vip-tags-file-name "TAGS"
vip-help-in-insert-mode nil
t then C-h is bound to help-command in insert mode,
if nil then it sis bound to delete-backward-char.
(setq vip-case-fold-search t) |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
VIP uses vip-command-mode-map as the local keymap for vi mode.
For example, in vi mode, SPC is bound to the function
vip-scroll. But, if you wish to make SPC and some other keys
behave like Vi, you can include the following lines in your `.vip'
file.
(define-key vip-command-mode-map "\C-g" 'vip-info-on-file) (define-key vip-command-mode-map "\C-h" 'vip-backward-char) (define-key vip-command-mode-map "\C-m" 'vip-next-line-at-bol) (define-key vip-command-mode-map " " 'vip-forward-char) (define-key vip-command-mode-map "g" 'vip-keyboard-quit) (define-key vip-command-mode-map "s" 'vip-substitute) (define-key vip-command-mode-map "C" 'vip-change-to-eol) (define-key vip-command-mode-map "R" 'vip-change-to-eol) (define-key vip-command-mode-map "S" 'vip-substitute-line) (define-key vip-command-mode-map "X" 'vip-delete-backward-char) |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| Jump to: | 0
1
|
|---|
| Jump to: | 0
1
|
|---|
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| Jump to: | A B C D E F G I K L M N P R S T V W Y |
|---|
| Jump to: | A B C D E F G I K L M N P R S T V W Y |
|---|
| [Top] | [Contents] | [Index] | [ ? ] |
| [Top] | [Contents] | [Index] | [ ? ] |
Distribution
1. A Survey of VIP
2. Vi Commands
3. Ex Commands
4. Customization
Key Index
Concept Index
| [Top] | [Contents] | [Index] | [ ? ] |
| Button | Name | Go to | From 1.2.3 go to |
|---|---|---|---|
| [ < ] | Back | previous section in reading order | 1.2.2 |
| [ > ] | Forward | next section in reading order | 1.2.4 |
| [ << ] | FastBack | previous or up-and-previous section | 1.1 |
| [ Up ] | Up | up section | 1.2 |
| [ >> ] | FastForward | next or up-and-next section | 1.3 |
| [Top] | Top | cover (top) of document | |
| [Contents] | Contents | table of contents | |
| [Index] | Index | concept index | |
| [ ? ] | About | this page |