nvi—New vi
nvi is a vi clone created for the 4.4BSD Berkeley Unix release. It’s intended to be “bug-for-bug” compatible with the original, although it does have a number of extensions over the original vi.
Important Command-Line Options
-ccommandExecute command at startup.
-FDon’t copy the entire file when starting to edit.
-RStart in read-only mode, setting the
readonlyoption.-sEnter batch (script) mode. This is only for ex and is intended for running editing scripts. Prompts and nonerror messages are disabled.
-SRun with the
secureoption set, disallowing access to external programs.
nvi Window Management Commands
Command | Function |
|---|---|
| Hide the current window |
| Display all buffers, including named, unnamed, and numeric buffers |
| Display the filenames of all backgrounded windows |
| Edit filename in a new window |
| Create a new window editing an empty buffer; /tmp is interpreted specially to create a new temporary file |
| Uncover filename into the current window |
| Uncover filename in a new window; the current window is split |
| Edit the next file in the argument list in a new window |
| Edit the previous file in the argument list in a new window |
| Increase or decrease the size of the current window by nrows rows |
| Edit the file containing tagstring in a new window |
The ^W command cycles between windows, top to
bottom. The :q and ZZ commands
exit the current window.
You may have multiple windows open on ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access