Scope: Pin Vim rather than Neovim, its version and features, OS, terminal or GUI, mappings, plugins, file encoding, and current buffer state. Commands can be remapped or feature-dependent.
Assumptions: Distinguish buffers, windows, tabs, files on disk, registers, and undo history. “Close all” or substitute commands may fail, prompt, or affect a wider range when buffers are modified or patterns contain special characters.
Facts and inference::version, :verbose map, messages, buffer list and resulting file diff are evidence; convenience or speed claims depend on the user workflow.
Failure and completion: Test unsaved buffers, read-only files, encoding, recovery files, mapping conflicts and undo. A workflow is complete when the intended range changed, the diff is correct, and recovery or undo remains available.
stateDiagram-v2
[*] --> Normal: vim file
Normal --> Insert: i, a, o
Insert --> Normal: Esc
Normal --> Visual: v, V, Ctrl+v
Visual --> Normal: Esc
Normal --> Command: :
Command --> Normal: Enter/Esc
Use these for structured text like code or paragraphs.
* i (Inner): The object itself (excluding whitespace/surroundings)
* a (Around): The object + surrounding whitespace/brackets
" Basic settingssetnumber" Show line numberssetrelativenumber" Relative line numberssettabstop=4" Tab widthsetshiftwidth=4" Indent widthsetexpandtab" Spaces instead of tabssetautoindent" Auto indentationsetsmartindent" Smart indentation" Searchsethlsearch" Highlight searchsetincsearch" Incremental searchsetignorecase" Case insensitivesetsmartcase" Case sensitive if uppercase" UIsetcursorline" Highlight current linesetshowmatch" Show matching bracketssetwildmenu" Command completion menusyntaxon" Syntax highlighting