wis until the start of the next word, excluding its first character.eis until the end of the current word, including the last character.
- In the command
dd, the seconddisn't a motion. It's just a shortcut by the vim designers.
- Typing a capital
Uwill undo all changes on a line. - Typing
Ctrl+Rwill redo the commands, or undo the undos.
- To change until the end of a word, type
ce.
- The change operator accepts a number and a motion like
d.
- Typing
Ctrl+gwill display the filename and the position in the file. - Typing
ggwill move to the start of a file, and typingGmoves to the bottom.
- Typing
Ctrl+owill jump to an older location. TypingCtrl+iwill jump to a newer location.
- To substitute only on the current line, type
:s/old/new. - To substitute in a range of lines, type
:#,#s/old/new/g. - To find each occurrence and prompt for substitution, type
:%s/old/new/gc.
- To save part of a file, select it in visual mode before executing
:w.
- To insert the contents of a file, type
:r FILENAME.
- Type
Rto replace more than one character.
- You can also use
yas an operator, e.g.ywyanks one word.
- If you want to ignore case for just one search command, use `/[term]\c.
- Type
:helpto get help. Add an argument to get help on a particular subject.
- Tab completion works for commands, as well as filenames following
:eor:w.