cofi / evil-leader

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

Keybinding does not work on gfm-mode (mode for Github markdown) #24

Open Andre0991 opened 9 years ago

Andre0991 commented 9 years ago

First, thanks for the plugin.

I use SPC as my leader.

I'm using the markdown-mode package. This package has a the gfm-mode as well, which provides GitHub flavored markdown. This mode has markdown-mode as its parent.

So I have this on my configuration:

(autoload 'markdown-mode "markdown-mode"
   "Major mode for editing Markdown files" t)
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . gfm-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . gfm-mode))

(evil-leader/set-key-for-mode 'gfm-mode
  "ml" 'markdown-insert-link
)

But when I'm editing a file on gfm-mode, I get "SPC m is undefined".

If I change the evil-leader line to markdown-mode instead, and if I effectivelly run markdown-mode, it works. However that doesn't help much because I want to use gfm-mode (which is derivated from the former).

My complete configuration is available on my dotfiles repository.

Thanks.