Sorry, (kbd "DEL") doesn't work, should be (kbd "<backspace>"). I thought they were the same.
On Thu, Aug 11, 2011 at 3:19 PM, York Zhao <[email protected]> wrote: I finally got the <backspace> binded in ibuffer by "forcing" rebind like this: (eval-after-load 'ibuffer '(progn ;; use the standard ibuffer bindings as a base (set-keymap-parent (evil-get-auxiliary-keymap ibuffer-mode-map 'normal t) (assq-delete-all 'menu-bar (copy-keymap ibuffer-mode-map))) (evil-define-key 'normal ibuffer-mode-map "j" 'ibuffer-forward-line) (evil-define-key 'normal ibuffer-mode-map "k" 'ibuffer-backward-line) (evil-define-key 'normal ibuffer-mode-map "J" 'ibuffer-jump-to-buffer) ; "j" (evil-define-key 'normal ibuffer-mode-map (kbd "DEL") 'ibuffer-unmark-backward))) But the question is: why wasn't this binding "overwritten" from the "copy-keymap"? Thanks, York On Thu, Aug 11, 2011 at 3:04 PM, York Zhao <[email protected]> wrote: Hi, I have this code to inherite most of the ibuffer key bindings while still keep the "j" and "k" bindings. (eval-after-load 'ibuffer '(progn ;; use the standard ibuffer bindings as a base (set-keymap-parent (evil-get-auxiliary-keymap ibuffer-mode-map 'normal t) (assq-delete-all 'menu-bar (copy-keymap ibuffer-mode-map))) (evil-define-key 'normal ibuffer-mode-map "j" 'ibuffer-forward-line) (evil-define-key 'normal ibuffer-mode-map "k" 'ibuffer-backward-line) (evil-define-key 'normal ibuffer-mode-map "J" 'ibuffer-jump-to-buffer) ; "j" )) This works fine however if I rebind the <backspace> before the previous code like this: (define-key evil-normal-state-map (kbd "<backspace>") 'scroll-down) The <backspace> key would then "fixed" to my binding (scroll-down) instead of the ibuffer binding. Is there any "better" way of rebinding evil keys? Or, is it possible for Evil to handle this situation? Thanks, York
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
