Search

Search IconIcon to open search

Vim

Last updatedUpdated: by Jakub Žovák · 2 min read

Properties
tags cscs/swe
created 20.05.2026, 10:00
modified 26.07.2026, 13:30
published Empty
sources Vim · Neovim
topics Terminal, Text Editor
authors Opus 4.7
ai-assisted Yes
  • 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, right
    • w / b — next / previous word
    • gg / G — top / bottom of file
    • 0 / $ — start / end of line
    • Ctrl+u / Ctrl+d — half page up / down
  • Editing
    • dd delete line, yy yank line, p paste
    • u undo, Ctrl+r redo
    • . repeat last change
  • Search & replace
    • /pattern search forward, ?pattern search backward
    • n / 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