Rebind keys in Spacemacs for NeoTree buffer

803 views Asked by At

I want to rebind movement keys in NeoTree buffer in Spacemacs. Looking at my other key bindings in dotspacemacs/user-config this should work:

(with-eval-after-load 'neotree
  (evil-define-key 'normal neotree-mode-map (kbd "i") 'neotree-previous-line)
  (evil-define-key 'normal neotree-mode-map (kbd "k") 'neotree-next-line))

but as far as I can see it does nothing. How should one do this? I wouldn't mind vanilla Emacs solution, but I'm more interested how Spacemacs binds keys. Thanks...

1

There are 1 answers

0
klozovin On BEST ANSWER

This answer is thanks to bmag at Github:

(with-eval-after-load 'neotree
  (evil-define-key 'evilified neotree-mode-map (kbd "i") 'neotree-previous-line)
  (evil-define-key 'evilified neotree-mode-map (kbd "k") 'neotree-next-line))