cofi / evil-leader

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

how to load-file #30

Closed pvinis closed 8 years ago

pvinis commented 8 years ago

i have this

(evil-leader/set-key "rr" (lambda (arg)
         (load-file "~/.emacs.d/init.el")))

but it doesnt work. it gives me wrong type argument: commandp. how can i fix that?

cofi commented 8 years ago

That's basic emacs stuff: You can only bind a command to a key. To make that lambda into a command, add the interactive form:

(evil-leader/set-key "rr" (lambda (arg)
         (interactive)
         (load-file "~/.emacs.d/init.el")))```
pvinis commented 8 years ago

thanks