I am new to spacemacs and currently save fils by s-s
(aka: cmd-s). I would like to switch to evil-normal-state
each time I save. How do I do this?
1 Answer
I don't use evil
. So I can only report what I found through a short internet search.
Several solutions are suggested there: https://www.reddit.com/r/emacs/comments/4emyt2/how_to_properly_configure_keybindings_for_evil/
I just cite two variants here:
The simplest one is using :w
instead of S-s
for saving the buffer.
The next simple thing is adding the following to your init file:
(add-hook 'after-save-hook #'evil-normal-state)
-
Thank you. That saved my problem. It didn't work when i reloaded my dot file with
spc-f-e-R
but after restarting emacs it worked. It works withS-s
as well.– villy393Dec 2, 2017 at 12:24