by Steve Oualline
This is the Vim cookbook page. It contains short recipes for doing many simple and not so simple things in Vim. You should already know the basics of Vim, however each command is explained in detail.
Each set of instructions is a complete package. Feel free to pick and choose what you need.
Character twiddling
If you type fast your fingers can easily get ahead of your mind. Frequently people transpose characters. For example the word "the" comes out "teh".
If you type fast your fingers can easily get ahead of your mind. Frequently people transpose characters. For example the word "the" comes out "teh".
To swap two characters, for example "e" with "h", put the cursor on the cursor on the "e" and type xp.
The "x" command deletes a character (the "e") and the "p" pastes it after the cursor (which is now placed over the "h".)