Advertisement

Modes

i - Insert mode
Esc - Normal mode
: - Command mode

Navigation

h j k l - Left, down, up, right
gg - Go to top
G - Go to bottom
0 - Start of line
$ - End of line

Editing

x - Delete character
dd - Delete line
yy - Copy line
p - Paste
u - Undo
Ctrl+r - Redo

Save/Quit

:w - Save
:q - Quit
:wq - Save and quit
:q! - Quit without saving
Advertisement
Last updated: January 2026
Advertisement