Previous: Customizing Constants, Up: Customization [Contents][Index]

### 4.2 Customizing Key Bindings

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 `~/.emacs.d/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)