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.
An easy way to customize VIP is to change the values of constants used in VIP. Here is the list of the constants used in VIP and their default values.
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
.
You can reset these constants in VIP by the Ex command set. Or you can include a line like this in your `.vip' file:
(setq vip-case-fold-search t)
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)