22 Apr
2011
22 Apr
'11
7:33 p.m.
On 2011-04-22 20:36 +0200, Isaac wrote:
Hello, I am still trying to remap c-z (to make it undo, but use C-\ for toggling), any suggestions to do it efficiently?
For "ESC" and "C-z", Viper defines a set of "intercept maps" which have precedence over all other maps. This should do what you want: (define-key viper-vi-intercept-map "\C-\\" 'viper-toggle-key-action) (define-key viper-vi-intercept-map "\C-z" 'undo-tree-undo) (define-key viper-emacs-intercept-map "\C-\\" 'viper-change-state-to-vi) (define-key viper-emacs-intercept-map "\C-z" 'undo-tree-undo) -- Vegard