Rebinded key becomes un-changeable

York Zhao gtdplatform at gmail.com
Thu Aug 11 21:04:56 CEST 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ourproject.org/pipermail/implementations-list/attachments/20110811/3b1afd40/attachment-0001.htm 


More information about the implementations-list mailing list