> Welcome to the Vim editor.
1 
2 function learnVim() {
3   const message = "Start your journey here.";
4   return message;
5 }
6 
~
NORMAL -- VISUAL -- INSERT

Master the Vim Universe.

Your journey into the powerful world of the Vim editor starts now. Learn the essential commands to navigate and edit text like a pro.

Begin Tutorial

The Core Concept: Vim Modes

Everything in Vim revolves around its modes. You are always in one.

Normal Mode

The default mode. Use it for navigation and manipulation of text. Press Esc from any other mode to return here. Think of this as your command center.

Insert Mode

This is for typing text, like a normal editor. Enter it by pressing i to insert before the cursor, or a to append after the cursor.

Visual Mode

Used for selecting text. Enter with v for character-wise selection, or V for line-wise. Once selected, you can run commands on the highlighted text.

Basic Editing Commands

The building blocks of text manipulation. (In Normal Mode)

Deleting Text

x - delete character

dw - delete word

dd - delete line

Copy & Paste

yy - yank (copy) a line

yw - yank a word

p - put (paste) after cursor

Changing Text

cw - change word

cc - change line

r - replace a character

Undo / Redo

u - undo last change

Ctrl + r - redo

Saving & Quitting

How to exit the editor (it's important!).

Press Esc to enter Normal Mode, then type : to enter Command-Line Mode.

  • :w - Write (save) the file.
  • :q - Quit the editor.
  • :wq - Write and quit.
  • :q! - Quit without saving changes (force quit).

Vim Cheat Sheet

A comprehensive reference for all essential commands.