Vi Editor Shortcuts

Mac Shorts

Navigation

h: Move left

j: Move down

k: Move up

l: Move right

Word Navigation

w: Move to the start of the next word

e: Move to the end of the current/next word

b: Move to the start of the previous word

Line Navigation

0: Move to the beginning of the line

^: Move to the first non-blank character

$: Move to the end of the line

Text Selection

v: Enter visual mode

V: Enter visual line mode

Ctrl + v: Enter visual block mode

Text Deletion

x: Delete the character under the cursor

dw: Delete from the cursor to the end of the word

dd: Delete the entire line

Undo and Redo

u: Undo the last change

Ctrl + r: Redo the undone change