Edit efficiently with Vim while in insert mode
Imagine you are writing the sentence below and you've just typed the word jumps (cursor position is denoted as X):
The quick brown fox jumps X
If you wanted to delete the previous word, jumps you could enter normal mode and type bdw, which would delete the word brown and place the cursor on the space after the word fox.
A better approach is to stay in insert mode and type control + w. This is much more efficient!
There are many other useful insert mode commands. A few include:
control + u --- will delete everything to the left of the cursor
control + t --- will indent one tabstop
control + d --- will unindent one tabstop
control r* --- inserts text from the * register
Written by Seth Brown
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#