evil
evil copied to clipboard
Evil remappings are reverted in dired and help buffers
Issue type
- Bug report
Environment
Emacs version: GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, cairo version 1.17.3) of 2020-08-28
Operating System: Arch Linux
Evil version: 1.14.0
Evil installation type: MELPA? (default one with straight.el)
Graphical/Terminal: under X
Tested in a make emacs
session (see CONTRIBUTING.md): yes.
Reproduction steps
- run
make emacs
- type
(evil-define-key nil evil-normal-state-map "j" 'evil-backward-char)
(evil-define-key nil evil-normal-state-map "k" 'evil-next-line)
(evil-define-key nil evil-normal-state-map "l" 'evil-previous-line)
(evil-define-key nil evil-normal-state-map ";" 'evil-forward-char)
(require 'dired)
dired
can be replaced with other package (not with any other, some work fine;) in the last line. See "Further notes"
- M-x eval-buffer
Expected behavior
Evil remappings work in help
and dired
buffers. In this particular case, default hjkl
shifted one key to the right, so jkl;
to move left, down, up, right, respectively. The only "workaround" is to put all require
-s before mappings.
Actual behavior
Keys are reverted back to the default ones in dired
and help
buffers (work fine in editor buffers though).
Further notes
See: https://github.com/ubolonton/emacs-tree-sitter/issues/123