In my .emacs I have the follow setting:
(define-key evil-motion-state-map “\C-u” ‘scroll-up-command) This works well.
But what if I wanted to change it to spacebar or Return key?
(define-key evil-motion-state-map “<return>” ‘scroll-up-command) (define-key evil-motion-state-map “SPC” ‘scroll-up-command) Nothing spectular will happen, the return/Enter key and spacebar are behaving their standard behaviour. I looked around for the right keys, and it seems they’re the rights keys. For example,
(global-set-key (kbd “<return>”) ‘save-buffer) Works fine.
What am I doing wrong in Emacs/Evil with the Enter key?
– ReneFroger 2014-04-12 00:47 UTC
ReneFroger, This works : (define-key evil-normal-state-map (kbd “RET”) ‘scroll-up) Though I don’t know much about lisp or programming for that matter. Copy pasted and changed from some existing lines in .emacs
– SA 2014-08-01 16:48 UTC
You should never bind
‘C-u’. It is important that it remain bound to command
‘universal-argument’. If not, you are inviting trouble throughout Emacs.
– DrewAdams 2014-08-01 16:52 UTC
The quick install instructions are wrong. Somebody who cares about evil-mode should fix them
– Anonymous 2014-11-12 10:42 UTC
Yes, “quick install instructions” are missing one line:
Someone please fix, I spent 1 hr looking into this issue, somehow I got to Package.el. From there I was able to figure it out, under “configuration”
(push '("marmalade" . "http://marmalade-repo.org/packages/")
(push '("melpa" . "http://melpa.milkbox.net/packages/")
– luism 2014-12-11 06:27 UTC