1

I'm using evil-leader and bind the leader key to <SPC>. Evil-leader config follows after evil-mode in .emacs file.

Problem: Sometimes when I hits <SPC>, it uses default forward char of evil-mode.

I added this line to unset the key.

(define-key evil-normal-state-map (kbd "SPC") nil)

It still doesn't help. So I M-x + evil-leader-mode every time the problem occur.

My full code is as below:

;; evil-mode
(evil-mode t)    

(require 'evil-leader)
(global-evil-leader-mode)
(setq evil-leader/in-all-states 1)
;; unbind evil dafault SPC of forward char
(define-key evil-normal-state-map (kbd "SPC") nil)
(evil-leader/set-leader "<SPC>")
(evil-leader/set-key
  "f" 'helm-find-files)
2

Per documentation on evil-leader Github site:

Note: You should enable global-evil-leader-mode before you enable evil-mode, otherwise evil-leader won’t be enabled in initial buffers (*scratch*, *Messages*, …).

  • Please provide a link to the documentation you mention. – Drew Mar 11 '16 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.