| ZZ | Write the file contents (if changed) and quit. |
| :x | Write the file contents (if changed) and quit (the ex equivalent of ZZ). |
| :q | Quit without saving changes. |
| :q! | Quit without saving changes and without confirmation. |
| :n | Next file. When multiple files are specified for editing, this command loads the next file. |
| Esc (the Escape key) | Exit insert mode and put the editor back into command mode. |
| h | Left one character. |
| j | Down one line. |
| k | Up one line. |
| l (ell) | Right one character. |
| 0 (zero) | Beginning of the current line. |
| ^ | First non-whitespace character on the current line. |
| $ | End of the current line. |
| H | Top of the screen. |
| L | Bottom of the screen. |
| G | End-of-file. |
| Ctrl-F | Down one screen. |
| Ctrl-B | Up one screen. |
| i | Enter insert mode to place text before the cursor. |
| a | Enter insert mode to place text after the cursor (append). This is necessary at the ends of lines. |
| C | Delete to end-of-line and enter insert mode. |
| R | Enter replace mode (a variant of insert mode) and overwrite existing characters. |
| dm | Delete a text block defined by a movement command m relative to the location where the command started. |
| dd | Delete the entire current line. |
| D | Delete to end-of-line (same as d$) |
| ym | Yank (copy) a text block defined by a movement command m relative to the location where the command started. |
| yy | Yank the entire current line. |
| P | Paste text on a line before the cursor. |
| p | Paste text on a line after the cursor. |
| /pattern | Search forward for pattern. |
| ?pattern | Search backward for pattern. |
| n | Repeat the last search. |
| N | Repeat the last search in the opposite direction. |