Save while in Vim's Insert Mode

While doing some repeitive work in Vim today I was wondering if I could shorten the number of keystrokes or make it easier for me to save the file that I was working on and not have to get out of insert mode, save the file with a :w and then get back into insert mode.

I found the answer on the Superuser site. While there are a number of people that don't think that hitting ctrl-O :w is Vimmish enough or the same number of keystrokes, I think that it is a good way to reduce some friction in my own development. It can also be assigned to other keystrokes to make it even easier.

I think that it's a good compromise that works for me. It's always good to be learning and this was a new one for me.

Share this post