Quick reference

Vim Keyboard Shortcuts Cheat Sheet

Practical guide to Vim keyboard shortcuts, including common operating modes, text editing, find and replace, and other core commands to help you master this powerful terminal editor.

· Published

Vim Keyboard Shortcuts Cheat Sheet

1. Basic Operations

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

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

3. Window Management

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

4. Tabs

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

5. Miscellaneous

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

Related topics