[Infographic] The Beginner's Vim Cheat Sheet
All of the Vim commands and tricks that you actually need to know.
[Infographic] The Beginner's Vim Cheat Sheet
Articles in Professional Tools | By August R. Garcia
Published
All of the Vim commands and tricks that you actually need to know.
4,071 views, 0 RAMs, and 1 comment
Are you new to Vim, the only legitimate text editor? Good thing you're on this page, since it contains the ultimate cheat sheet for all of the most important Vim commands, keyboard shortcuts, and hotkeys.
Vim Cheat Sheet Infographic
Vim Commands Cheat Sheet, Copy-Pasteable
Exiting Vim
:w - Write (Save)
:wq - Write and quit
:q - Quit, fails if unsaved
:q! - Quit, even if unsaved
Modes
ESC - Return to normal mode
i - Insert at cursor position
a - Insert after cursor position
o - Insert on line below cursor
v - Enter visual mode
ctrl+v - Enter visual mode (vertical)
V - Enter visual mode (full lines)
Toggling Case
u [in visual mode] - To lowercase
U [in visual mode] - To uppercase
Undo/Redo
u - Undo
ctrl+r - Redo
Movement
$ - Jump to end of line
^ - Jump to start of line
h - Move left
j - Move down
k - Move up
l - Move right
H - Move to top of screen
M - Move to middle of screen
L - Move to bottom of screen
gg - Move to start of file
G - Move to end of file
420gg - Move to line 420
w - Jump to start of next word
b - Jump to start of prev word
Search
/something - Search for string
n - Jump to next match
N - Jump to prev match
/something\c - Case insensitive search
Copy-Pasting
y [in visual mode] - Copy highlighted text
yy - Copy the current line
d [in visual mode] - Cut highlighted text
dd - Cut the current line
Ctrl+Shift+V - Paste from external clipboard
Find-and-Replace
- Find and Replace All in Document
:%s/find/replace/g
- Find and Replace All on Current Line
:s/find/replace/g [in visual mode]
- Find and Replace All in Highlighted Section
:'<,'>s/find/replace/g [in visual mode]
- Find and Replace All in Document
:%s/address/replace/g
Important Regular Expression (REGEX) Characters
. - Any single character
* - Up to unlimited characters
Bonus Notes
Also see the infographic "Visualizing the Information Superhighway," learn about the best keyboard to use with Vim, and search for more content tagged as being about Vim.








- C U 7 Internet Marketing/SEO Tricks from the Slack Chat
- C U [Video] 28+ Methods to Make Money Online: The Ultimate Tier List from S-Tier through F-Tier
- C U Scriptable Headless Browsers 101: PhantomJS vs. Headless Chrome/Chromium vs. Headless Firefox
- C U [Video] 33 More SEO Questions Answered
- C U 5 Tasks You Didn't Know You Could do With Vim
- C U [Infographic] The Beginner's Vim Cheat Sheet
- C U 5 Tasks You Didn't Know Could be Done from the Developer Console
- C U A Review and Overview of the Charles Web Debugging Proxy Application
- C U SquirrelMail vs. RoundCube vs. Horde: Why does every web hosting company come with these three email clients?
- C U The Top 5 Ways to Make Money on the Internet (If You're Completely Incompetent)
August Garcia is some guy who used to sell Viagra on the Internet. He made this website to LARP as a sysadmin while posting about garbage like user-agent spoofing, spintax, the only good keyboard, virtual assitants from Pakistan, links with the rel="nofollow" attribute, proxies, sin, the developer console, literally every link building method, and other junk.
Available at arg@256kilobytes.com, via Twitter, or arg.256kilobytes.com. Open to business inquiries based on availability.
Bump with a tangential article that's been going around the Internet:
Sir, I can do you a nice SEO.
Post a New Comment
To leave a comment, login to your account or create an account.
Do you like having a good time?
Register an Account
You can also login to an existing account or reset your password. All use of this site is subject to the terms of service and privacy policy.
Read Quality Articles
Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.
View Articles →
Argue with People on the Internet
Use your account to explain why people are wrong on the Internet forum.
View Forum →
Vandalize the Wiki
Or don't. I'm not your dad.
View Wiki →
Ask and/or Answer Questions
If someone asks a terrible question, post a LMGTFY link.
View Answers →
Make Some Money
Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.