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
-c
command
Execute command at startup.
-F
Donât copy the entire file when starting to edit.
-R
Start in read-only mode, setting the
readonly
option.-s
Enter batch (script) mode. This is only for ex and is intended for running editing scripts. Prompts and nonerror messages are disabled.
-S
Run with the
secure
option 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 ...
Get vi and Vim Editors Pocket Reference, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.