██╗ ██╗██╗███╗ ███╗ ██║ ██║██║████╗ ████║ ██║ ██║██║██╔████╔██║ ╚██╗ ██╔╝██║██║╚██╔╝██║ ╚████╔╝ ██║██║ ╚═╝ ██║ ╚═══╝ ╚═╝╚═╝ ╚═╝
Vim's modal editing model eliminates constant mouse usage. Motion keys let your fingers stay on the home row. Complex edits that take seconds in other editors happen in milliseconds with Vim's composable commands.
With a rich plugin ecosystem spanning decades, Vim can become an IDE, a note-taking system, a presentation tool, or anything you imagine. VimScript and Lua (in Neovim) give you total control over every behavior.
Vim ships with nearly every Unix-like system on Earth. SSH into any Linux server, embedded device, or cloud instance and Vim is there waiting. Your muscle memory travels with you anywhere there's a terminal.
"Vim is a text editor that is upwards compatible to Vi. It can be used to edit all kinds of plain text. It is especially useful for editing programs." — :help vim
Vim's power comes from its modal design. Unlike most editors, Vim has distinct modes for navigation, editing, selecting, and executing commands. Understanding modes is the key to Vim mastery.
Default mode. Every keypress is a command. Navigate, delete, copy, paste.
Type text freely. Characters appear at cursor. Most familiar mode for newcomers.
Select text visually. Apply commands to the selected region. Three sub-modes.
Execute Ex commands: save, quit, substitute, set options, run shell commands.
Overwrite existing characters. Like Insert but replaces instead of inserts.
i — insert before cursor
a — append after cursor
o — open line below
O — open line above
I — insert at line start
A — append at line end
s — substitute char
S — substitute line
c{motion} — change + enter insert
v — character-wise visual
V — line-wise visual
Ctrl+v — block visual
gv — reselect last selection
o — move to other end of selection
In visual: use motion keys to extend selection, then apply operators (d, y, c, ~, >, <)
: — enter command mode
/ — forward search
? — backward search
! — filter through shell
Use Tab for completion, ↑↓ for history, Ctrl+c or Esc to cancel
A special sub-state entered after typing an operator in Normal mode. Vim waits for a motion or text object to complete the command.
Examples: dwaitw, cwaiti", ywaitap
Press Esc to cancel the pending operator.
| Key / Command | Category | Description |
|---|---|---|
| h | motion | Move cursor left |
| j | motion | Move cursor down |
| k | motion | Move cursor up |
| l | motion | Move cursor right |
| w | motion | Jump to start of next word |
| b | motion | Jump to start of previous word |
| e | motion | Jump to end of word |
| 0 | motion | Jump to start of line |
| $ | motion | Jump to end of line |
| gg | motion | Go to first line of file |
| G | motion | Go to last line of file |
| Ctrl+d | motion | Scroll half-page down |
| Ctrl+u | motion | Scroll half-page up |
| % | motion | Jump to matching bracket/paren |
| i | edit | Enter Insert mode before cursor |
| a | edit | Enter Insert mode after cursor |
| o | edit | Open new line below and insert |
| x | edit | Delete character under cursor |
| dd | edit | Delete current line |
| yy | edit | Yank (copy) current line |
| p | edit | Paste after cursor |
| P | edit | Paste before cursor |
| u | edit | Undo last change |
| Ctrl+r | edit | Redo last undone change |
| . | edit | Repeat last change |
| ciw | edit | Change inner word (delete word + insert) |
| diw | edit | Delete inner word |
| yiw | edit | Yank inner word |
| ~ | edit | Toggle case of character |
| /pattern | search | Search forward for pattern |
| ?pattern | search | Search backward for pattern |
| n | search | Go to next search match |
| N | search | Go to previous search match |
| * | search | Search forward for word under cursor |
| # | search | Search backward for word under cursor |
| v | visual | Enter character-wise Visual mode |
| V | visual | Enter line-wise Visual mode |
| Ctrl+v | visual | Enter block Visual mode |
| :w | ex | Write (save) file |
| :q | ex | Quit Vim |
| :wq | ex | Write and quit |
| :q! | ex | Quit without saving (force) |
| :s/old/new/g | ex | Substitute old with new on current line |
| :%s/old/new/g | ex | Substitute throughout entire file |
| :set nu | ex | Enable line numbers |
| :set hlsearch | ex | Highlight search matches |
| :e file | ex | Open file in current buffer |
| :sp file | ex | Split window horizontally and open file |
| :vsp file | ex | Split window vertically and open file |
| za | fold | Toggle fold at cursor |
| zM | fold | Close all folds |
| zR | fold | Open all folds |
| ma | mark | Set mark 'a' at cursor position |
| `a | mark | Jump to exact position of mark 'a' |
| "ayy | register | Yank line into register 'a' |
| "ap | register | Paste from register 'a' |
The Vim plugin ecosystem spans over three decades. These twelve plugins form a solid foundation for any Vim configuration.
From a simple vi clone to the most ubiquitous editor on the planet — the story of Vim spans five decades of computing history.
Vim is not just a text editor — it is a complete, composable development environment that outperforms bloated GUIs in every metric that matters to a professional developer.
| Capability | Vim / Neovim | VSCode |
|---|---|---|
| Startup time | <100ms | 300ms–3s with extensions |
| Memory usage | 5–20MB | 500MB–2GB+ |
| Works over SSH | Native — just type vim | Extension required, server agent installed |
| Works without GUI | Yes — pure terminal | No |
| Mouse required | Never | Frequently |
| LSP / autocomplete | Native in Neovim; plugins in Vim | Built-in |
| Syntax highlighting | Treesitter (Neovim), built-in (Vim) | Built-in |
| Fuzzy file finding | fzf.vim, telescope.nvim | Built-in Ctrl+P |
| Git integration | fugitive.vim, gitsigns.nvim | Built-in Source Control |
| Macros / automation | Native q-macros, . repeat, :norm | Not available |
| Config portability | Plain text, git it and forget it | Requires Settings Sync + Microsoft account |
| Runs on servers | Always | Never |
| Platform | Native C — runs anywhere | Electron (Chromium + Node.js) |
| Telemetry | None | On by default |
| Vim keybindings | Is Vim | VSCodeVim extension (imperfect emulation) |
| Extensibility | VimScript + Lua (Neovim) | TypeScript extensions |
Production servers don't have GUIs. When a disk is 95% full at 3am and you need to edit a config file over SSH, Vim is your only real option. Learning Vim now means your editor works in every environment you'll ever encounter.
Vim commands form a grammar: verb + noun. delete inside "uotes. change around paragraph. Once internalized, this grammar makes you faster than any point-and-click workflow.
Senior engineers who have mastered Vim consistently report 2–3x editing throughput on complex refactors. The bottleneck shifts from mechanical editing to thinking — exactly where it should be.
Every hour you invest in Vim pays dividends for the rest of your career. VSCode's UI changes with every release. Vim's keybindings, learned in 1995, work identically in 2025 — and every editor worth using has a Vim mode.
Watch Vim in action — opening a file, writing Python code, using motions and visual mode, running a substitution, and saving. Use the buttons to step through each scene.
ci" changes inside quotes. dap deletes a paragraph.:%s/foo/bar/g replaces every occurrence in the file.n (next match), it is the fastest way to make repetitive edits.:w. Quit with :q. Save and quit with :wq or ZZ. Force-quit without saving: :q!