简体   繁体   中英

Evil in dired/dired+ keymapping

I'm looking for a way to navigate in dired/dired+ and evil mode by using 'h' 'j' 'k' 'l' like as in vim netrw. I've found some lisp phrases and applied those but those don't work at all.

For instance,

 
(eval-after-load 'dired
  '(progn
     ;; use the standard Dired bindings as a base
     (evil-make-overriding-map dired-mode-map 'normal t)
     (evil-define-key 'normal dired-mode-map
       "h" 'evil-backward-char
       "j" 'evil-next-line
       "k" 'evil-previous-line
       "l" 'evil-forward-char
       "r" 'dired-do-redisplay))) ; "l"

Emacs just runs 'dired-do-kill-lines' as if it doesn't recognize my configuration. Could you give me some configuration, please?

What if you press Cz until you put yourself in Normal mode (vim mode) ? I do that and I can use those keys to navigate. I use smart-mode-line to see what mode I am in (I don't recall what shows the default mode-line).

You can choose to enter Dired mode in Normal state: http://wikemacs.org/index.php/Evil#Enter_an_emacs_mode_in_a_given_state

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM