Changing from insert mode to normal mode is usually quick. The other direction is more cumbersome. You either have to reach out for the escape key, or use the
Ctrl-[ (which I never got used to).
After seeing a blog post suggesting to map
jk to exit insert mode, I was inspired to create my own mapping. I chose
kj because it’s faster to type, as typing inwards is faster than outwards (you can check for yourself by tapping with your fingers on your desk). To use it, add the following to your
:inoremap kj <ESC>
Now, whenever you are in insert mode, quickly typing
kj will exit insert mode. It will introduce a short pause after typing
k, but this is only a visual one, so it doesn’t actually slow you down.
kj is one of the rarest bigrams in English, so you’ll almost never have to actually type it inside a text, but if you do, just wait a bit after typing k to type the
After writing this post, I’ve came across a Vim Wiki page listing all kinds of ways to avoid the escape key.
I’ve recently published my vimrc, take a look it might give you ideas for other neat tricks.