cofi / evil-leader

<leader> key for evil
GNU General Public License v3.0
315 stars 22 forks source link

Cannot use <SPC> in motion mode, when <SPC> is a leader key #21

Open maximbaz opened 9 years ago

maximbaz commented 9 years ago

My leader key is assigned to <SPC>.

  (evil-leader/set-leader "<SPC>")
  (global-evil-leader-mode)

But now I cannot use <SPC> in motion mode, in particular:

Obviously the following line "causes" my problem.

(if evil-leader-mode
    (progn
      (evil-normalize-keymaps)
      (define-key evil-motion-state-local-map no-prefix map)   <---------

I assume you cannot simply move the mapping for motion state under evil-leader/in-all-states without breaking many current configurations, but perhaps it is possible to create another parameter to control motion state, enabled by default?

UPDATE: Apparently, without this line leader key will not work in visual state. So need to find a better solution, rather than the workaround I proposed above.