commands
vim — modal text editor
Normal mode interprets keys as commands; i enters insert mode, Esc returns, :wq saves and exits. :q! may discard changes. -u NONE bypasses user configuration for a controlled session; -i NONE disables viminfo. Example assumes a fresh text-streams lab fixture.
Formal Syntax & Structure
linux syntaxlinux
vim [OPTION]... [FILE]...Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| -u | option | Startup configuration selection |
| -i | option | Viminfo file selection |
| FILE | operand | Path to edit |
Return Value
interactive session and exit status
Normal exit can occur after saving or deliberately discarding changes; :cq explicitly exits with an error status. Verify intended bytes and save diagnostics rather than using editor status as proof of persistence.
Working Example
Example Snippetlinux
vim vim-note.txt