vi commands | Description |
:w, :q, :wq | Write (save) changes, quit vi, or do both together |
h, j, k, l | Move one character at a time (left, up, down, right) |
w, b | Move forward or backward by words |
W, B | Move forward or backward by words, ignoring punctuation |
), ( | Move forward or backward by sentences |
Ctrl-F, Ctrl-B, Ctrl-D, Ctrl-U | Move one screen forward or backward, or move half a screen down or up |
i, a, o | Insert before the cursor, append after the cursor, or open a blank line |
c, d, y | Operators for changing, deleting, or yanking (copying) text. Combine an operator with a movement command to create an editing command. |
p, P | Put buffer text after or before the cursor |
., u, U | Repeat last edit, undo last edit, or undo edits to current line |