Vim Commands You Need to Know: Episode 1
Most people who have spent any time using the command line have learned to use vim well enough to edit conf files: moving the cursor, entering insert mode, and saving and quitting the file :wq. I know because I was one of those people for years. It wasn’t until I found a few magical commands that I truly understood why vim was a true competitor in a world of IDE’s and Textmate clones.
The following is a list of commands that you should be using all the time. If you do you will start to understand that you are a god.
-
JJoin lines: Joins the current line with the one below it leaving your cursor in a space between them. -
ciwChange in word: deletes the current word and puts you in insert mode. -
diwDelete in word: deletes the current word and leaves you in normal normal mode. -
fcFind character: will find whatever character you enter afterfand put your cursor there. -
tcFind til character: will find whatever character you enter aftertand put your cursor before it. -
FcFind previous char. -
TcFind til previous character: will find the previous character and put your cursor after it.
[