save in insert mode (VIM)

I am new to vim,

Usually, I find myself wanting to save and stay in insert mode, rather than hit escape, :w and back into insert mode.


Ctrl+O, then :w and Enter.


You could add an alias like inoremap <F3> <c-o>:w<cr> in you .vimrc.


I cannot add comment to the @Tordek's answer, due to lack of reputation :) Therefore complementing his answer:

inoremap <F2> <C-\><C-o>:w<CR>

Adding <C-\> will prevent moving cursor one character left.


Without getting into a debate about the right or the wrong way, if you use a graphical Vim like MacVim or GVim, you should be able to use Cmd-s or Ctrl-s for saving. I can say that it works on OS X with MacVim and Cmd-s and so you can save your stuff in the insert mode.