3

I'm using evil (specifically via spacemacs). Is there a way to enter a regular command without leaving insert state? For example, running SPC i u (for adding unicode character) while still in insert state?

  • All key commands of emacs are just a function call. Why don't you press M-x and then input the relevant function instead?If you don't remember the function name, C-h k will help you. – duoani Dec 17 '16 at 1:34
7

This might not be exactly what you want, but there is a way to execute one command and then return to insert state. Press C-o (evil-execute-in-normal-state) which puts you in a state where the next keybinding will be executed in normal state, and then you will be returned to insert state. For example, while in insert state, press C-o and then SPC f y. This will display the path of the current file in the echo area (and copy it to the kill ring) and leave you in insert state.

At the very least, this should be a good way to deal with your insert Unicode character example

  • Yes, that's exactly what I was looking for! – sid-kap Nov 13 '16 at 6:08

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.