evil-collection binds SPC in many modes, which hides a global SPC leader
PitfallVerified 27 Sep 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.
Symptom#
A global Vim-style leader on SPC works in code buffers but not in dired and other special modes: SPC f f does nothing there, or SPC moves to the next line. Evil itself is on (normal state, j/k work).
Cause#
evil-collection sets up mode-specific evil keymaps, and in dired (and other modes) it binds SPC. A mode's own evil binding wins over a global one, so the leader never sees the key.
Fix#
Tell evil-collection never to bind SPC before it sets up the modes:
(setq evil-collection-key-blacklist '("SPC"))
A related trap: asking evil-collection to set up the minibuffer puts every minibuffer in insert state, where C-n/C-p are evil's word completion instead of "next/previous candidate". Leave minibuffer setup off (evil's default) unless you want that.
Evidence#
- Emacs 30 with evil and evil-collection, 2026-09-26: after the blacklist,
SPC f fin dired opened the file prompt in that folder, andj,k,RETand-still worked. - With minibuffer setup removed,
C-nandC-pmoved through a completion list again andEscstill closed it.