Problem

You’re typing away in Vim’s Insert mode and just typed a word wrongly. That’s a very common scenario right? If you come from a MS Word background (like me), your first instinct may be to hit Shift+Backspace. In Vim, however, that doesn’t work. I’ll give two methods that do.

screenshot

Solution 1

Ctrl+w

Simple as that. As stated in the Vim documentation, in Insert mode this is to “delete the word before the cursor”.

Solution 2

<Esc>ciw

Press Esc (or Ctrl+[, or Ctrl+c) to enter Normal mode, and ciw to delete the current word and pop back into Insert mode at the same time. (Bonus: do <Esc>ciW to delete the current WORD, which includes punctuation, such as “short-term” or <i,j>)

This was what I did before I knew about Ctrl+w.