Get AI summaries of any video or article — Sign up free
Vim in 100 Seconds thumbnail

Vim in 100 Seconds

Fireship·
5 min read

Based on Fireship's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Vim is a keyboard-first editor that keeps hands on the keys by using keystrokes for navigation, editing, saving, and running commands.

Briefing

Vim’s core pitch is simple: a keyboard-first editor can make coding faster by keeping hands on the keys and reducing context switching to the mouse. Built on the original Unix text editor vi (released in 1976), Vim arrived in 1991 with a long list of improvements—and it still runs in the terminal and on most systems. That portability matters because it means Vim often appears when you least expect it (for example, when a command drops you into an editor with no GUI). Exiting is therefore a practical survival skill: “:q” quits an unmodified file, “:q!” discards changes, and “:wq” saves and quits.

Once inside, Vim’s power comes from mode-based editing. Normal mode is for navigation and commands; insert mode is for typing; visual mode supports selection; and command-line mode handles “:” commands like setting options. Movement is fast and mnemonic-driven: “h” and “l” move left and right, while “j” and “k” move down and up. Deletion is equally direct: “x” removes a character under the cursor, and “dd” deletes an entire line. Mistakes are recoverable with “u” for undo. For readability, Vim can add line numbers via “:set number,” and line-jumping can be done with “:number.”

Copying, saving, and running code are also handled without leaving the editor. Pasting from the system clipboard uses “+p,” saving uses “:w,” and running a command from within Vim uses “:! <shell command>.” The overall workflow is designed to keep editing and execution tightly coupled—type, adjust, save, run—without reaching for a mouse.

The transcript then pivots to why Vim still matters even in the era of modern IDEs, arguing that it’s an “evergreen” skill: once learned, the muscle memory carries across a career. The practical route is learning Vim inside VS Code rather than abandoning it. Setup involves installing the “vim” extension (specifically “vscodevim.vim” with about 2 million installations mentioned) and enabling key repeat through the “VS Code Vim” GitHub repository instructions. After restarting VS Code, a quick test—holding “k” to see cursor movement—confirms key repeat is working.

With the environment ready, the focus shifts to a small command set that delivers most of the benefit quickly. Navigation uses “h j k l” in command mode. Insert-mode entry uses “i,” while line-focused insertions use “I” (beginning of line) and “A” (end of line). Lowercase “a” appends after the cursor, and “x” deletes characters without leaving command mode. Character replacement uses “r,” which swaps the character under the cursor with what’s typed next. The message is that Vim can be adopted incrementally—especially inside VS Code—by learning a handful of commands that make day-to-day editing smoother and more keyboard-native.

Cornell Notes

Vim is a keyboard-first editor built on vi, designed to keep hands on the keys and minimize mouse-driven context switching. It runs in terminals and often appears unexpectedly on systems, so knowing exit commands (“:q”, “:q!”, “:wq”) is essential. Editing relies on modes: Normal mode for navigation/commands and Insert mode for typing, with movement handled by “h j k l” and line readability improved via “:set number”. When Vim is used inside VS Code, the “vim” extension plus key-repeat settings enable a smooth experience. A practical starter set includes “i/I/A/a” for inserting, “x” for deleting, and “r” for replacing characters while staying in command mode.

Why does Vim’s keyboard-first approach matter for coding speed and focus?

The workflow is built around staying in the editor with minimal switching. Movement and editing happen through keystrokes (like “h j k l” and “x”), and even saving/running can be done with command-line shortcuts such as “:w” and “:! <shell command>”. That design keeps attention on text manipulation rather than repeatedly moving to and from a mouse.

What are the key exit commands when Vim is encountered unexpectedly?

For an unmodified file, “:q” quits. If changes were made and need to be discarded, “:q!” throws them away. To save and quit, “:wq” writes changes and exits. These three commands cover the most common “I’m stuck in Vim” situations.

How do Vim modes affect what keys do?

In Normal mode, keys act as commands (for example, “x” deletes, “dd” deletes a line, “h j k l” move). Insert mode is for typing; entering it with “i” lets the user type directly into the document. Returning to Normal mode is done with the Escape key, after which navigation and command keystrokes work again.

How do the transcript’s navigation and deletion commands work together?

Navigation uses “h” (left), “l” (right), “k” (up), and “j” (down). Deletion can be character-level with “x” or line-level with “dd”. If a deletion is a mistake, “u” undoes the last change—so editing stays fast without leaving command mode.

What’s the difference between “i”, “I”, “a”, and “A” for inserting text?

“i” inserts at the cursor. “I” inserts at the beginning of the line. “a” inserts after the cursor position. “A” inserts at the end of the line. The transcript emphasizes cursor position: “a” starts insertion one character later, while “i” starts at the cursor.

How can edits be made without leaving command mode using “x” and “r”?

“x” deletes the character under the cursor (for example, pressing “x” multiple times removes multiple characters). “r” replaces a single character under the cursor with the next typed character (for example, replacing “2” with “5” by pressing “r” then typing “5”). Both actions happen while staying in Normal/command mode.

Review Questions

  1. What are the three Vim quit commands and when would you use each?
  2. Describe how cursor position changes the behavior of “i” vs “a”, and “I” vs “A”.
  3. Give an example workflow for navigating to a line, editing it, saving it, and running a command using Vim shortcuts.

Key Points

  1. 1

    Vim is a keyboard-first editor that keeps hands on the keys by using keystrokes for navigation, editing, saving, and running commands.

  2. 2

    Knowing “:q”, “:q!”, and “:wq” is critical because Vim often appears in terminal workflows unexpectedly.

  3. 3

    Vim’s mode system determines key behavior: Normal mode issues commands, while Insert mode accepts typing until Escape returns to Normal mode.

  4. 4

    Core navigation uses “h j k l”, and quick deletion uses “x” (character) and “dd” (line), with “u” for undo.

  5. 5

    Readability can be improved with “:set number”, and clipboard pasting uses “+p”.

  6. 6

    Inside VS Code, installing the “vim” extension and enabling key repeat via the “VS Code Vim” GitHub instructions makes Vim-style navigation feel responsive.

  7. 7

    A fast starter command set includes “i/I/A/a” for insertion, “x” for deletion, and “r” for single-character replacement without leaving command mode.

Highlights

Vim exit commands form a practical safety net: “:q” quits, “:q!” discards changes, and “:wq” saves then quits.
Mode-based editing is the heart of Vim: Escape returns to Normal mode, where “h j k l”, “x”, and “dd” work as commands.
Clipboard and execution can stay inside Vim: “+p” pastes from the system clipboard, “:w” saves, and “:! <shell command>” runs a command.
Learning Vim inside VS Code is incremental: install the “vim” extension and enable key repeat so held keys move smoothly.
The transcript’s minimal editing toolkit—“i/I/A/a”, “x”, and “r”—covers most day-to-day text changes quickly.

Topics

Mentioned