Mercurial > hg > xemacs-beta
diff lisp/viper/viper-keym.el @ 80:1ce6082ce73f r20-0b90
Import from CVS: tag r20-0b90
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:06:37 +0200 |
parents | c7528f8e288d |
children | 6a378aca36af |
line wrap: on
line diff
--- a/lisp/viper/viper-keym.el Mon Aug 13 09:05:44 2007 +0200 +++ b/lisp/viper/viper-keym.el Mon Aug 13 09:06:37 2007 +0200 @@ -21,6 +21,23 @@ ;; Code +(provide 'viper-keym) + +;; compiler pacifier +(defvar vip-always) +(defvar vip-current-state) +(defvar vip-mode-string) +(defvar vip-expert-level) +(defvar vip-ex-style-editing-in-insert) +(defvar vip-ex-style-motion) + +(eval-when-compile + (let ((load-path (cons "." load-path))) + (or (featurep 'viper-util) + (load "viper-util.el" nil nil 'nosuffix)) + )) +;; end pacifier + (require 'viper-util) ;;; Variables @@ -35,6 +52,29 @@ "Key used to ESC. Must be set in .vip file or prior to loading Viper. This setting cannot be changed interactively.") + +;;; Emacs keys in other states. + +(defvar vip-want-emacs-keys-in-insert t + "*Set to nil if you want complete Vi compatibility in insert mode. +Complete compatibility with Vi is not recommended for power use of Viper.") + +(defvar vip-want-emacs-keys-in-vi t + "*Set to nil if you want complete Vi compatibility in Vi mode. +Full Vi compatibility is not recommended for power use of Viper.") + +(defvar vip-no-multiple-ESC t + "*If true, multiple ESC in Vi mode will cause bell to ring. +This is set to t on a windowing terminal and to 'twice on a dumb +terminal (unless the user level is 1, 2, or 5). On a dumb terminal, this +enables cursor keys and is generally more convenient, as terminals usually +don't have a convenient Meta key. +Setting vip-no-multiple-ESC to nil will allow as many multiple ESC, +as is allowed by the major mode in effect.") + +(defvar vip-want-ctl-h-help nil + "*If t then C-h is bound to help-command in insert mode, if nil then it is +bound to delete-backward-char.") ;;; Keymaps @@ -335,7 +375,7 @@ (define-key vip-vi-basic-map "~" 'vip-toggle-case) (define-key vip-vi-basic-map "\C-?" 'vip-backward-char) (define-key vip-vi-basic-map "_" 'vip-nil) - + ;;; Escape from Emacs to Vi for one command (global-set-key "\C-c\\" 'vip-escape-to-vi) ; everywhere @@ -441,7 +481,7 @@ (defun vip-zap-local-keys () "Unconditionally reset Viper vip-*-local-user-map's. -Rarely useful, but if you made a mistake by switching to a mode that adds +Rarely useful, but if u made a mistake by switching to a mode that adds undesirable local keys, e.g., comint-mode, then this function can restore sanity." (interactive) @@ -579,6 +619,4 @@ alist)) -(provide 'viper-keym) - ;;; viper-keym.el ends here