Tutorial ยท 10 min read ยท 2026-04-15

Vim is not that bad (10 minutes to "I can use this")

The "how do I quit vim" meme on Stack Overflow is funny for a reason โ€” vim is genuinely confusing the first time. But the confusion is almost entirely about modes, not about the editor itself. Once the modal idea clicks, vim becomes one of the fastest text editors ever made. Here's the 10-minute path from confusion to competence.

The one idea that changes everything

Every text editor you've used before โ€” Notepad, VSCode, Word, Google Docs โ€” has exactly one mode: insert mode. You press letters, those letters appear at the cursor. Done.

Vim has three modes, and that's the whole mental shift:

You're in NORMAL mode when vim opens. To type text, press i (for insert) โ€” now you're in INSERT mode and can type normally. To stop typing and go back to NORMAL mode, press Escape. That's the whole modal concept.

The nine keys that get you to "I can use this"

You do not need to learn all of vim. You need to learn these nine keys:

KeyWhat it doesMode it works in
iStart typing (enter INSERT mode)NORMAL
EscStop typing (back to NORMAL mode)INSERT
h j k lMove cursor left / down / up / rightNORMAL
xDelete the character under the cursorNORMAL
ddDelete the current lineNORMAL
uUndoNORMAL
:wSave the fileNORMAL โ†’ COMMAND
:qQuitNORMAL โ†’ COMMAND
:wqSave AND quitNORMAL โ†’ COMMAND

That's it. If you know those nine keys, you can edit any file on any Linux system. Everything else vim does is optimization.

Why hjkl instead of arrow keys?

This is the question every new vim user asks, and the answer is actually simple: when Bill Joy wrote vi in 1976, the terminal he used didn't have arrow keys. The cursor-movement keys had to be on the home row. h j k l is where your right hand's fingers naturally sit when you touch-type, so that's what he picked.

Why learn them now, 50 years later? Because your hand never has to leave the home row. Every time you reach for the arrow keys, you lose rhythm. Experienced vim users navigate faster than they can with a mouse because every motion is one key press away.

The arrow keys do work in vim, by the way. Nothing stops you from using them. They're just slower.

The "how do I quit vim" meme, solved forever

If you find yourself trapped in vim and you have no idea how to exit:

  1. Press Escape (this gets you out of any mode back to NORMAL)
  2. Type :q! and press Enter (this quits, throwing away any changes)

The exclamation point means "force." :q! is "quit and I don't care that I have unsaved changes." You will never need anything else to escape vim.

If you do want to save your changes, :wq is the sequence. "Write and quit."

The four keys that move you up a level

Once you're comfortable with the basics, four more keys will 10ร— your editing speed:

These four are the big unlock. Combined with dd and x and i, you can edit faster than you ever could with a mouse.

The "operator + motion" pattern

Here's where vim gets really interesting. Most commands in NORMAL mode follow the form operator + motion:

And motions include w (word), $ (end of line), 0 (start of line), G (end of file), and so on. You combine them:

Once this clicks, vim stops feeling like "a lot of keys to memorize" and starts feeling like a grammar. You don't memorize dw as a separate thing โ€” you learn d and you learn w and they combine naturally.

Try it โ€” interactive, in your browser

Reading about vim will only take you so far. Muscle memory is the whole point. LinuxSim ships with an interactive vim tutor that runs a real (small) vim state machine and walks you through 10 lessons:

  1. Cursor motion (hjkl)
  2. Insert mode (i and Esc)
  3. Append (a)
  4. Delete character (x)
  5. Delete line (dd)
  6. Yank & paste (yy, p)
  7. Undo (u)
  8. Word motion (w, b)
  9. Open new line (o)
  10. Save & quit (:w, :q, :wq)

Each lesson gives you a starting buffer, a goal, and lets you practice with real keystrokes. When the buffer matches the goal, the lesson advances. Finishing all 10 takes about 20 minutes โ€” less than this blog post.

๐Ÿš€ Launch the Vim Tutor โ†’

When should you actually use vim?

Honest answer: whenever you're on a server over SSH. That's the real reason to learn vim โ€” it's the only text editor you're guaranteed to have on any Linux machine. It comes preinstalled on every distribution, no exceptions. nano is usually there too, but vim is everywhere.

For day-to-day coding, VS Code is probably a better choice. But if you ever SSH into a server to tweak a config file, or if you're debugging on a remote box and need to quickly edit a log filter, vim is what's waiting for you. Learning the 13 keys in this post means you'll never be stuck again.

Further reading