2

I want to insert a newline by pressing the return key, but keep the normal status in evil mode. In Vim, I can do this by nmap <CR> o<Esc>. What is its equivalent in evil-mode?

3

I unbind RET, SPC and TAB (this one might be controversial) in normal state. This isn't strictly the equivalent, but works well for me:

(with-eval-after-load 'evil-maps
  (define-key evil-motion-state-map (kbd "SPC") nil)
  (define-key evil-motion-state-map (kbd "RET") nil)
  (define-key evil-motion-state-map (kbd "TAB") nil))
  • I only take what I want: (with-eval-after-load 'evil-maps (define-key evil-motion-state-map (kbd "RET") nil)) and it works. Many thanks. – harryln Oct 26 '17 at 15:52
  • @harryln : if this solution works for you, please upvote and accept the answer. – Dan Oct 26 '17 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.