WTF-IS: VIM 90% of what you need to survive in Vim Editor
Vim looks intimidating because it does not behave like most modern text editors. There are no obvious buttons for everything, and pressing a key does not always insert that character. Instead, Vim is built around modes, commands, motions, and operators.
Once that idea clicks, Vim becomes much less mysterious.
What Is Vim?
In 1976, Bill Joy developed vi at the University of California, Berkeley. Vi evolved from ex, which itself grew out of the older ed line editor created by Ken Thompson.
The name vi comes from the visual command in ex. Unlike a traditional line editor, vi allowed users to work with the text displayed on a screen, which was a major improvement when video terminals became practical.
Then came Vim.
In 1991, Bram Moolenaar released Vim, originally meaning Vi IMitation, later changed to Vi IMproved. Vim was inspired by Vi and by the earlier Stevie Vi clone. It added features, portability, scripting, extensibility, and many other improvements while retaining the modal editing model that made Vi distinctive.
Vim eventually spread far beyond its Unix roots. It is available on Linux, BSD, macOS, Windows, and many other platforms. The official project continues to be actively developed. As of October 2026, the current stable release is Vim 9.2
Why Is Vim So Popular?
1. You Can Keep Your Hands on the Keyboard
Vim is designed around keyboard-driven editing. Moving through text, selecting it, changing it, searching, replacing, and manipulating entire sections of a file can all be done without reaching for a mouse.
The important distinction is that Vim is not simply a collection of keyboard shortcuts. Its commands can be combined.
For example:
dw
means "delete a word."
3dw
means "delete three words."
d$
means "delete from here to the end of the line."
This combination of operators, motions, and counts is one of the things that makes Vim so powerful.
2. It Works in the Terminal
You're SSH'd into a server somewhere in the world. There is no graphical desktop, no IDE, and no mouse. You have a terminal and a shell.
Vim works perfectly well in that environment.
It is particularly useful for system administration, remote development, editing configuration files, working on servers, and situations where installing a graphical editor is impractical.
3. It Is Extremely Extensible
Vim has a large plugin ecosystem and can be configured for programming, writing, version control, file navigation, completion, linting, debugging, and much more.
With enough configuration, Vim can provide many of the capabilities people normally associate with an IDE. That does not automatically make it better than an IDE, though. Vim's advantage is that you can build an environment around the workflow you actually want.
4. It Is Old, but It Does Not Feel Obsolete
There is something slightly ridiculous about using an editor whose basic interaction model dates back to the 1970s.
But that is also the point.
The underlying ideas are simple, composable, and extremely efficient once learned. Vim has survived for decades because those ideas still work.
Bonus: Vim Is Charityware
Vim is distributed as charityware. You can use and copy Vim freely, but the project encourages users to support charitable work benefiting children in Uganda.
After Bram Moolenaar's death in 2023, the original charity arrangement changed. The Vim project announced in 2026 that support for the Kibaale project in Uganda would continue through Kuwasha. Vim remains charityware.
Getting Started with Vim
Vim has several modes. For beginners, three are particularly important:
| Mode | Purpose |
|---|---|
| Normal Mode | Moving around, editing, deleting, copying, undoing, and issuing commands. |
| Insert Mode | Typing text normally. |
| Visual Mode | Selecting text. |
There are also command-line, Replace, Select, Terminal, and other modes. You do not need to learn all of them on day one.
Normal Mode
When Vim starts, you are normally in Normal Mode.
Press i to enter Insert Mode:
i
Press Esc to return to Normal Mode.
There are several useful ways to enter Insert Mode:
| Command | What it does |
|---|---|
i | Insert before the cursor. |
a | Insert after the cursor. |
I | Insert at the beginning of the line. |
A | Insert at the end of the line. |
o | Open a new line below and enter Insert Mode. |
O | Open a new line above and enter Insert Mode. |
Moving Around
Yes, these are the famous keys:
h left
j down
k up
l right
Arrow keys also work, so you do not need to pretend you're a Vim monk from day one.
But Vim becomes much more useful when you start thinking in terms of larger movements:
| Command | Movement |
|---|---|
w | Forward to the next word. |
b | Backward to the previous word. |
e | To the end of the current/next word. |
0 | Beginning of the line. |
^ | First non-whitespace character of the line. |
$ | End of the line. |
gg | First line of the file. |
G | Last line of the file. |
Ctrl-d | Scroll down roughly half a screen. |
Ctrl-u | Scroll up roughly half a screen. |
Editing
Vim's editing commands are where things start getting interesting.
| Command | What it does |
|---|---|
x | Delete the character under the cursor. |
dd | Delete the current line. |
dw | Delete a word. |
d$ | Delete to the end of the line. |
D | Delete from the cursor to the end of the line. |
cc | Change the entire line. |
cw | Change a word. |
C | Change to the end of the line. |
r | Replace one character. |
J | Join the current line with the next line. |
u | Undo. |
Ctrl-r | Redo. |
. | Repeat the last change. |
The period command deserves special attention. If you perform a useful edit once, Vim can repeat it with .. This is one of the small features that becomes surprisingly powerful once you start using it deliberately.
Copy, Cut, and Paste
Vim usually calls copying yanking.
| Command | What it does |
|---|---|
yy | Yank the current line. |
yw | Yank a word. |
y$ | Yank to the end of the line. |
dd | Delete a line. Deleted text can then be pasted. |
p | Paste after the cursor or below the current line. |
P | Paste before the cursor or above the current line. |
For selecting arbitrary text, press v to enter Visual Mode, move the cursor to select the text, and then use y to yank or d to delete it.
Search
Searching is simple:
/search_term
Press Enter, then:
n
to jump to the next match, or:
N
to jump to the previous match.
To search backwards instead, use ?:
?search_term
You can also search for the word currently under the cursor:
*
and search for that word backwards with:
#
Search and Replace
Vim's substitution command is extremely useful.
Replace the first occurrence on the current line:
:s/old/new/
Replace every occurrence on the current line:
:s/old/new/g
Replace every occurrence in the entire file:
:%s/old/new/g
Ask for confirmation before every replacement:
:%s/old/new/gc
The g means "replace all matches on each affected line," while c asks for confirmation.
Files and Ex Commands
Commands beginning with : are entered on Vim's command line.
| Command | What it does |
|---|---|
:w | Save the file. |
:w filename | Save as another filename. |
:q | Quit. |
:q! | Quit without saving changes. |
:wq | Save and quit. |
:x | Save if necessary and quit. |
:e filename | Open another file. |
:Ex | Open Vim's file explorer. |
:set number | Show line numbers. |
:set nonumber | Hide line numbers. |
Useful Tricks
Once you know the basics, these commands are worth learning:
| Command | What it does |
|---|---|
gg=G | Indent the entire file according to Vim's indentation rules. |
~ | Toggle the case of the character under the cursor. |
u | Undo. |
Ctrl-r | Redo. |
zz | Center the current line on screen. |
zt | Put the current line at the top of the screen. |
zb | Put the current line at the bottom of the screen. |
:%d | Delete every line in the current buffer. |
:set paste | Adjust behavior for pasting text from external sources. Use with care. |
:help command | Open Vim's built-in documentation for a command. |
The Secret: Commands Combine
This is the part that makes Vim different from a typical editor.
Many commands follow the pattern:
[count] [operator] [motion]
For example:
dw delete one word
d2w delete two words
3dd delete three lines
d$ delete to the end of the line
yG yank from here to the end of the file
c$ change to the end of the line
Once you understand this pattern, Vim stops being a giant list of unrelated keyboard shortcuts. You start learning a relatively small set of building blocks that can be combined.
Vimtutor: The Best Place to Start
If you actually want to learn Vim rather than memorize a few commands, run:
vimtutor
It is an interactive tutorial designed specifically for beginners and takes roughly 30 minutes. Vim's own documentation recommends it as the starting point for learning the basic commands.{index=3}
Modern Vim 9.2 also includes an interactive tutor accessible from Vim itself with :Tutor.
One Last Thing
Do not try to memorize everything in this article.
Learn i, Esc, h, j, k, l, w, b, dd, yy, p, u, Ctrl-r, /, n, :w, and :q first.
Then use Vim.
You'll forget commands. That's fine. Type :help, run vimtutor, and keep going.
After a while, you'll stop thinking about Vim commands at all. You'll think about what you want to do to the text, and your hands will simply do it.
That's when Vim starts to make sense.
Learn More
- Vim's official documentation is the definitive reference.
- Vim's user manual provides a more structured introduction.
- Vim Awesome is useful for discovering plugins.
That's it. You now have considerably more than enough to survive in Vim.
Forward: arazgray.com/wtf-is-vim