Vim is available on every Linux system and significantly speeds up your workflow once learned. Unlike regular editors where you navigate with a mouse and type, Vim separates navigation from editing. This modal editing philosophy allows performing complex operations with just a few keystrokes — delete an entire function, rename a variable, or reformat a paragraph without touching the mouse. The initial learning curve is steep, but the return on investment comes within weeks.
Modes¶
- Normal — navigation and commands (default mode)
- Insert (i, a, o) — typing text
- Visual (v, V, Ctrl+v) — text selection (character, line, block)
- Command (:) — Ex commands, search, replace
Navigation + Editing¶
h j k l, w/b, gg/G, /pattern, *
dd yy p, ciw, ci", ., 5dd
:%s/old/new/g, :w, :q
The key concept is composition: operator + motion. For example, d (delete) + w (word) deletes a word, c (change) + i" (inner quotes) changes the content inside quotes. The dot . repeats the last command — extremely powerful for repetitive edits. Macros (qa to record, @a to replay) automate more complex sequences.
Neovim¶
-- ~/.config/nvim/init.lua
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.tabstop = 4
vim.opt.expandtab = true
vim.g.mapleader = ' '
Neovim brings Lua configuration, a built-in LSP client for language support (autocomplete, go-to-definition, refactoring), tree-sitter for precise syntax highlighting, and an active plugin ecosystem. With plugins like telescope.nvim (fuzzy finder), nvim-lspconfig (LSP), and nvim-treesitter, Neovim becomes a full-featured IDE.
Vim Is an Investment¶
Start with vimtutor, learn 20 basic shortcuts, and gradually add more. After a month of daily use, you will edit faster than in any GUI editor.