I am trying to re-map a key in evil-mode
/evil-commentary-mode
when in dired-mode
. I tried to add a hook to dired-mode
to disable the minor commentary mode, but it disables it for other major modes as well. I've tried the following as well but it doesn't work (I've also tried it with evil-normal-state-map
):
(add-hook 'dired-mode-hook
(lambda ()
(define-key evil-commentary-mode-map (kbd "g") 'revert-buffer)))
dired-mode
it gets disabled globally. – A. Blizzard May 15 '18 at 8:39g
is a prefix for otherevil-mode
commands, and I think I was silly trying to re-map it. I use space as my leading key in normal state so just bindedrevert-buffer
to<SPC> r
indired-mode
. – A. Blizzard May 15 '18 at 20:24