You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
setnumberrelativenumber # Show line numbers (absolute for current line, relative for others)
setexpandtab # Convert tabsto spaces
settabstop=4 # Number of spaces atab counts forsetshiftwidth=4 # Number of spaces for each step of autoindentsetsofttabstop=4 # Number of spaces atab counts forwhile editing
Basic Navigation
h - Move left
j - Move down
k - Move up
l - Move right
Mode Switching
Esc - Switch to normal mode
i - Switch to insert mode
v - Switch to visual mode
File Operations
:w - Save file
:q - Quit
:wq - Save and quit
Movement Commands
{NUMBER}k - Move up NUMBER lines
{NUMBER}j - Move down NUMBER lines
a - Moves the cursor 1 character to the right and enters insert mode
w - Jump to the start of the next word
b - Jump to the start of the previous word
Editing Commands
x - Delete character under cursor (in normal mode)
d - Delete (requires a motion command)
dd - Delete entire line
Copy and Paste
y - Yank (copy)
p - Paste
Note: delete and yank operations go into the same buffer, ready for p to use