Vim
Last updatedUpdated: by Jakub Žovák · 2 min read
Properties
created
20.05.2026, 10:00
modified
26.07.2026, 13:30
topics
Terminal, Text Editor - Modal, keyboard-driven text editor originally created by Bram Moolenaar (1991)
- Designed for efficient editing via composable commands rather than mouse interaction
- Modern fork: Neovim — extensible, Lua-configured, with a more open development model
# Modes
- Normal
- Default mode; keys are commands for navigation and manipulation
- Insert
- Text entry; entered with
i, a, o, etc.
- Visual
- Selection mode;
v (character), V (line), Ctrl+v (block)
- Command-line
- Triggered by
: for ex commands like :w, :q, :s/old/new/g
- Replace
- Triggered by
R; overwrites existing characters
# Core Concepts
- Operators + motions
- Commands compose:
d (delete) + w (word) = dw; c (change) + i" (inside quotes) = ci"
- Text objects
iw inner word, aw a word, ip paragraph, i( inside parens, etc.
- Registers
- Named clipboards;
"ay yanks into register a, "ap pastes from it
- Marks
ma sets mark a; 'a jumps to its line
- Macros
qa records into register a, q stops, @a replays
# Essential Commands
- Navigation
h j k l — left, down, up, rightw / b — next / previous wordgg / G — top / bottom of file0 / $ — start / end of lineCtrl+u / Ctrl+d — half page up / down
- Editing
dd delete line, yy yank line, p pasteu undo, Ctrl+r redo. repeat last change
- Search & replace
/pattern search forward, ?pattern search backwardn / N next / previous match:%s/old/new/g replace globally
- Files
:w write, :q quit, :wq / ZZ save and quit, :q! discard
# Configuration
- Vim:
~/.vimrc - Neovim:
~/.config/nvim/init.lua (or init.vim) - Popular plugin managers
vim-plug, packer.nvim, lazy.nvim
- Popular distributions