Evil-mode defining ex commands & redefining whole line commands (eg. dd)
Russell Dunphy <russell <at> russelldunphy.com>
2014-09-13 22:17:58 GMT
Hi, new to Emacs (Evil-mode persuading me that it’s worth attempting the switch). Have a few questions.
I’m trying to get adhoc key mappings working as they would in vim. So for example if I open a new Clojure file I might want to quickly set up a mapping to run it. In vim this would be something like:
:map ,t :!lein exec %<CR>
Is there a way to implement the `map` ex command in evil-mode to make creating arbitrary, temporary mappings like this possible and easy?
Second question relates to trying to get evil-mode to play nicely with paredit. I’m using `evil-paredit-mode` which makes most things work, but whole line commands such as `dd` don’t seem to work, and I can’t work out how to rebind them. I’ve tried the following:
(evil-define-key 'normal evil-paredit-mode-map (kbd “dd”)
(lambda () (move-beginning-of-line)
But I get the error “key sequence dd starts with non-prefix key d”.
Thanks in advance for your help!
implementations-list mailing list
implementations-list <at> lists.ourproject.org