Vim Cheat Sheet
Essential Vim modal editing commands for navigation, editing, search-and-replace, and multi-file workflows.
2 PagesIntermediateJan 25, 2026
Editing Commands
Deleting, copying, and changing text.
- dd / yy- Delete (cut) current line / yank (copy) current line
- p / P- Paste after cursor / paste before cursor
- x- Delete character under cursor
- cw- Change word: delete word and enter insert mode
- u / Ctrl-r- Undo / redo
- .- Repeat the last change
- v / V / Ctrl-v- Visual mode: character-wise, line-wise, block-wise selection
Search & Replace
Find text and substitute patterns.
vim
:/pattern " Search forward for pattern:?pattern " Search backward for patternn / N " Repeat search forward / backward:%s/foo/bar/g " Replace all 'foo' with 'bar' in file:%s/foo/bar/gc " Same, with confirmation per match:s/foo/bar/g " Replace all occurrences on current line
Files & Windows
Saving, quitting, and splitting the view.
vim
:w " Save:q " Quit:wq or :x " Save and quit:q! " Quit without saving:sp file.txt " Horizontal split:vsp file.txt " Vertical splitCtrl-w w " Cycle between split windows
Pro Tip
Learn to combine operators with motions (e.g. d2w, ci", y$) instead of memorizing hundreds of commands — Vim's power comes from composing a small set of verbs and motions, not rote memorization.
Was this cheat sheet helpful?
Explore Topics
#Vim#VimCheatSheet#DevOps#Intermediate#ModesNavigation#EditingCommands#SearchReplace#FilesWindows#CheatSheet#SkillVeris
Advertisement
Sri Hayavadhana Info-Tech
Professional Web Designing Services
- Responsive Websites
- E-commerce Solutions
- SEO Friendly Design
- Fast & Secure
- Support & Maintenance