1

I have re-assigned the RETURN key to exit the insert state in Evil mode.

(define-key evil-insert-state-map [return] 'evil-normal-state)

But this does't work with emacs -nw in terminal. Any way to make it work?

Drew
  • 75,699
  • 9
  • 109
  • 225
Arktik
  • 932
  • 4
  • 15
  • 3
    Terminals do not send `[return]`. Use `(kbd "RET")` which will work in and out of terminals. Note that you can ask Emacs -- `C-h k` would have told you how that key was described. – phils Oct 12 '18 at 21:32
  • 2
    Writing vectors with keys isn't the cleanest ways to define keybindings, `kbd` allows you to use the Emacs notation for keys, and it will make your init file more readable for everyone, including you. –  Oct 12 '18 at 21:59
  • @phils Thanks! And thanks for the tip with `C-h k`. – Arktik Oct 12 '18 at 21:59
  • @DoMiNeLa10 OK. Thanks. I will keep that in mind! – Arktik Oct 12 '18 at 22:01

0 Answers0