In coffee-mode
RET
is bound to coffee-newline-and-indent
which works fine.
I also use evil-mode
to have Vim emulation. evil-mode
uses the standard newline-and-indent
so the indentation is not correct for some vim commands such as o
or O
.
What would be the best way to rebind newline-and-indent
to coffee-newline-and-indent
?
I'm still a newbie in ELisp and tried the line below but it doesn't work.
(add-hook 'coffee-mode-hook
(lambda ()
(setq newline-and-indent '(funcall coffee-newline-and-indent))))
Try the following:
I know it looks overly simple, but if evil-mode works the way I think it does then it should work.