| Command | Description . |
|---|---|
ESC:q! |
The Most Important Vim Command™ |
i |
Exit normal mode, enter insertion mode |
ESC |
Exit insertion mode, enter normal mode |
| Arrow keys | Move around |
0 |
Go to beginning of line |
$ |
Go to beginning of line |
:w |
Save (write) a file |
:q |
Quit a file (must be saved) |
:wq |
Write and quit a file |
:q! |
Force-quit a file, discarding any changes |
u |
Undo |
x |
Delete the character under the cursor |
dd |
Delete a line |
p |
Put (paste) deleted text |
it’s |
spots No, you mean its spots |
Ctrl-F |
Go forward one screen |
Ctrl-B |
Go backward one screen |
G |
Go to last line |
1G |
Go to first line |
/<string> |
Search for |