Mercurial > hg > xemacs-beta
comparison lisp/viper/viper-keym.el @ 175:2d532a89d707 r20-3b14
Import from CVS: tag r20-3b14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:50:14 +0200 |
parents | 0132846995bd |
children | bfd6434d15b3 |
comparison
equal
deleted
inserted
replaced
174:bb3568571b84 | 175:2d532a89d707 |
---|---|
25 | 25 |
26 ;; compiler pacifier | 26 ;; compiler pacifier |
27 (defvar viper-always) | 27 (defvar viper-always) |
28 (defvar vip-current-state) | 28 (defvar vip-current-state) |
29 (defvar vip-mode-string) | 29 (defvar vip-mode-string) |
30 (defvar vip-expert-level) | 30 (defvar viper-expert-level) |
31 (defvar vip-ex-style-editing-in-insert) | 31 (defvar vip-ex-style-editing-in-insert) |
32 (defvar vip-ex-style-motion) | 32 (defvar vip-ex-style-motion) |
33 | 33 |
34 ;; loading happens only in non-interactive compilation | 34 ;; loading happens only in non-interactive compilation |
35 ;; in order to spare non-viperized emacs from being viperized | 35 ;; in order to spare non-viperized emacs from being viperized |
57 Must be set in .vip file or prior to loading Viper. | 57 Must be set in .vip file or prior to loading Viper. |
58 This setting cannot be changed interactively.") | 58 This setting cannot be changed interactively.") |
59 | 59 |
60 ;;; Emacs keys in other states. | 60 ;;; Emacs keys in other states. |
61 | 61 |
62 (defvar vip-want-emacs-keys-in-insert t | 62 (defcustom vip-want-emacs-keys-in-insert t |
63 "*Set to nil if you want complete Vi compatibility in insert mode. | 63 "*Set to nil if you want complete Vi compatibility in insert mode. |
64 Complete compatibility with Vi is not recommended for power use of Viper.") | 64 Complete compatibility with Vi is not recommended for power use of Viper." |
65 | 65 :type 'boolean |
66 (defvar vip-want-emacs-keys-in-vi t | 66 :group 'viper) |
67 | |
68 (defcustom vip-want-emacs-keys-in-vi t | |
67 "*Set to nil if you want complete Vi compatibility in Vi mode. | 69 "*Set to nil if you want complete Vi compatibility in Vi mode. |
68 Full Vi compatibility is not recommended for power use of Viper.") | 70 Full Vi compatibility is not recommended for power use of Viper." |
69 | 71 :type 'boolean |
70 (defvar vip-no-multiple-ESC t | 72 :group 'viper) |
73 | |
74 (defcustom vip-no-multiple-ESC t | |
71 "*If true, multiple ESC in Vi mode will cause bell to ring. | 75 "*If true, multiple ESC in Vi mode will cause bell to ring. |
72 This is set to t on a windowing terminal and to 'twice on a dumb | 76 This is set to t on a windowing terminal and to 'twice on a dumb |
73 terminal (unless the user level is 1, 2, or 5). On a dumb terminal, this | 77 terminal (unless the user level is 1, 2, or 5). On a dumb terminal, this |
74 enables cursor keys and is generally more convenient, as terminals usually | 78 enables cursor keys and is generally more convenient, as terminals usually |
75 don't have a convenient Meta key. | 79 don't have a convenient Meta key. |
76 Setting vip-no-multiple-ESC to nil will allow as many multiple ESC, | 80 Setting vip-no-multiple-ESC to nil will allow as many multiple ESC, |
77 as is allowed by the major mode in effect.") | 81 as is allowed by the major mode in effect." |
78 | 82 :type 'boolean |
79 (defvar vip-want-ctl-h-help nil | 83 :group 'viper) |
84 | |
85 (defcustom vip-want-ctl-h-help nil | |
80 "*If t then C-h is bound to help-command in insert mode, if nil then it is | 86 "*If t then C-h is bound to help-command in insert mode, if nil then it is |
81 bound to delete-backward-char.") | 87 bound to delete-backward-char." |
88 :type 'boolean | |
89 :group 'viper) | |
82 | 90 |
83 | 91 |
84 ;;; Keymaps | 92 ;;; Keymaps |
85 | 93 |
86 ;; Keymaps for vital things like \e and C-z. | 94 ;; Keymaps for vital things like \e and C-z. |
112 (defvar vip-vi-kbd-map (make-sparse-keymap) | 120 (defvar vip-vi-kbd-map (make-sparse-keymap) |
113 "This keymap keeps keyboard macros defined via the :map command.") | 121 "This keymap keeps keyboard macros defined via the :map command.") |
114 | 122 |
115 (defvar vip-vi-diehard-map (make-sparse-keymap) | 123 (defvar vip-vi-diehard-map (make-sparse-keymap) |
116 "This keymap is in use when the user asks Viper to simulate Vi very closely. | 124 "This keymap is in use when the user asks Viper to simulate Vi very closely. |
117 This happens when vip-expert-level is 1 or 2. See vip-set-expert-level.") | 125 This happens when viper-expert-level is 1 or 2. See viper-set-expert-level.") |
118 | 126 |
119 | 127 |
120 (vip-deflocalvar vip-insert-local-user-map (make-sparse-keymap) | 128 (vip-deflocalvar vip-insert-local-user-map (make-sparse-keymap) |
121 "Auxiliary map for per-buffer user-defined keybindings in Insert state.") | 129 "Auxiliary map for per-buffer user-defined keybindings in Insert state.") |
122 (put 'vip-insert-local-user-map 'permanent-local t) | 130 (put 'vip-insert-local-user-map 'permanent-local t) |
582 (princ (format "vip-emacs-global-user-minor-mode: %S\n" | 590 (princ (format "vip-emacs-global-user-minor-mode: %S\n" |
583 vip-emacs-global-user-minor-mode)) | 591 vip-emacs-global-user-minor-mode)) |
584 (princ (format "vip-emacs-state-modifier-minor-mode: %S\n" | 592 (princ (format "vip-emacs-state-modifier-minor-mode: %S\n" |
585 vip-emacs-state-modifier-minor-mode)) | 593 vip-emacs-state-modifier-minor-mode)) |
586 | 594 |
587 (princ (format "\nvip-expert-level %S\n" vip-expert-level)) | 595 (princ (format "\nviper-expert-level %S\n" viper-expert-level)) |
588 (princ (format "vip-no-multiple-ESC %S\n" vip-no-multiple-ESC)) | 596 (princ (format "vip-no-multiple-ESC %S\n" vip-no-multiple-ESC)) |
589 (princ (format "viper-always %S\n" viper-always)) | 597 (princ (format "viper-always %S\n" viper-always)) |
590 (princ (format "vip-ex-style-motion %S\n" | 598 (princ (format "vip-ex-style-motion %S\n" |
591 vip-ex-style-motion)) | 599 vip-ex-style-motion)) |
592 (princ (format "vip-ex-style-editing-in-insert %S\n" | 600 (princ (format "vip-ex-style-editing-in-insert %S\n" |
625 (mapcar (function (lambda (p) | 633 (mapcar (function (lambda (p) |
626 (define-key map (eval (car p)) (cdr p)))) | 634 (define-key map (eval (car p)) (cdr p)))) |
627 alist)) | 635 alist)) |
628 | 636 |
629 | 637 |
638 ;;; Local Variables: | |
639 ;;; eval: (put 'vip-deflocalvar 'lisp-indent-hook 'defun) | |
640 ;;; End: | |
641 | |
642 | |
630 ;;; viper-keym.el ends here | 643 ;;; viper-keym.el ends here |