Skip to content

Vim Keyboard Shortcuts Cheat Sheet

Vim Keyboard Shortcuts Cheat Sheet

1. Basic Operations

Action Shortcut
Enter Normal Mode Esc
Enter Insert Mode i
Enter Command Mode :
Quit Vim :q
Save File :w
Search Text /text
Replace Text :s/old/new/g

2. Text Editing

Action Shortcut
Delete Character x
Delete Line dd
Copy Line yy
Paste p
Undo u
Redo Ctrl + r

3. Window Management

Action Shortcut
New Window :new
Vertical Split :vsplit
Switch Window Ctrl + w, w
Close Window :q

4. Tabs

Action Shortcut
New Tab :tabnew
Switch Tab :tabn or :tabp
Close Tab :tabc

5. Miscellaneous

Action Shortcut
Open Help :help
View Key Mappings :map
Record Macro q + macro_key
Execute Macro @ + macro_key