nvi (new vi) is a re-implementation of the classic Berkeley text editor, ex/vi, traditionally distributed with BSD and, later, Unix systems. It was originally distributed as part of the Fourth Berkeley Software Distribution (4BSD).
Due to licensing disputes between AT&T and the Computer Systems Research Group (CSRG) at the University of California, Berkeley, the CSRG was required to replace all Unix-derived portions of BSD source with new and unencumbered code. nvi was one of many components to be rewritten despite the fact that the original vi was from UC Berkeley. AT&T had a legal claim over the license. nvi turned out to be a major improvement over the classical vi as discussed below.
Usually referred to as a vi clone, nvi contains a number of features not present in the original program. These include:
- 8-bit clean data, lines and files limited by available memory
- Multiple edit buffers
- Colon command-line editing and path name completion
- Tag stacks
- Cscope support
- Extended Regular Expressions
- Infinite undo
- Horizontal scrolling
- Message catalogs (Dutch, English, French, German, Russian, Spanish, Swedish)
- Preliminary support for Perl and Tcl/Tk scripting languages
Features that are not present in version 1.79 (which are in the original program) include:
- lisp mode
- open mode
Credits and distribution
It was originally derived from the first incarnation of elvis, written by Steve Kirkendall, as noted in the README file included in nvi's sources.
Sven Verdoolaege added support for Unicode in 2000. He also has been developing a GTK+ front end for nvi, but this effort seems to have stalled. The aspects of nvi that are still marked preliminary or unimplemented are, for the time being, likely to remain that way.
BSD projects continue to use nvi version 1.79 due to licensing differences between Berkeley Database 1.85 and the later versions by Sleepycat Software. nvi is unusual because it uses a database to store the text as it is being edited. Sven Verdoolaege's changes after version 1.79 use locking features not available in the Berkeley DB 1.85 database.
nvi can vary subtly across the BSDs.
- Lionel Sambuc. "Termcap update, replacing elvis by nvi.".
- "nvi commitlog". Archived from the original on May 1, 2001.
- Mike Fabian. "(CJK) Support in SuSE Linux".
- Jun-ichiro itojun Hagino and Yoshitaka Tokugawa. "Multilingual vi clones: past, now and the future".