Nvi
Encyclopedia
nvi is a re-implementation of the classic Berkeley text editor
Text editor
A text editor is a type of program used for editing plain text files.Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code....

, ex/vi, traditionally distributed with BSD, and later, Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 systems. It was originally distributed as part of the Fourth Berkeley Software Distribution
Berkeley Software Distribution
Berkeley Software Distribution is a Unix operating system derivative developed and distributed by the Computer Systems Research Group of the University of California, Berkeley, from 1977 to 1995...

 (4BSD).

Due to licensing disputes between AT&T
AT&T
AT&T Inc. is an American multinational telecommunications corporation headquartered in Whitacre Tower, Dallas, Texas, United States. It is the largest provider of mobile telephony and fixed telephony in the United States, and is also a provider of broadband and subscription television services...

 and the Computer Systems Research Group
Computer Systems Research Group
The Computer Systems Research Group was a research group at the University of California, Berkeley that was dedicated to enhancing AT&T Unix operating system and funded by Defense Advanced Research Projects Agency.- History :...

 (CSRG) at the University of California, Berkeley
University of California, Berkeley
The University of California, Berkeley , is a teaching and research university established in 1868 and located in Berkeley, California, USA...

 (see USL v. BSDi
USL v. BSDi
USL v. BSDi was a lawsuit brought in the United States in 1992 by Unix System Laboratories against Berkeley Software Design, Inc and the Regents of the University of California over intellectual property related to UNIX...

), 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 re-written despite the fact that the original vi was from UC Berkeley
University of California, Berkeley
The University of California, Berkeley , is a teaching and research university established in 1868 and located in Berkeley, California, USA...

. AT&T had a legal claim over the license. nvi turned out to be a major improvement over the classical vi as discussed below.

Features

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
    Cscope
    cscope is a console mode or text-based graphical interface that allows computer programmers or software developers to search C source code . It is often used on very large projects to find source code, functions, declarations, definitions and regular expressions given a text string. cscope is free...

     support
  • Extended Regular Expressions
  • Infinite undo
    Undo
    Undo is a command in many computer programs. It erases the last change done to the document reverting it to an older state. In some more advanced programs such as graphic processing, undo will negate the last command done to the file being edited....

  • Horizontal scrolling
    Scrolling
    In computer graphics, filmmaking, television production, and other kinetic displays, scrolling is sliding text, images or video across a monitor or display. "Scrolling", as such, does not change the layout of the text or pictures, or but incrementally moves the user's view across what is...

  • Message catalogs (Dutch, English, French, German, Russian, Spanish, Swedish)
  • Preliminary support for Perl
    Perl
    Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...

     and Tcl/Tk scripting languages


Features that are not present in version 1.79 (which are in the original program) include:
  • lisp mode
  • modelines
  • open mode

Credits and distribution

nvi was written by Keith Bostic
Keith Bostic
Keith Bostic is a computer programmer from the United States.In 1986, Bostic joined the Computer Systems Research Group at the University of California, Berkeley. He was one of the principal architects of the Berkeley 4.4BSD and 4.4BSD-Lite releases...

, and currently seems to be frozen at version 1.79. It is the default vi
Vi
vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by the Single Unix Specification and POSIX.The original code for vi...

 on all BSD systems (NetBSD
NetBSD
NetBSD is a freely available open source version of the Berkeley Software Distribution Unix operating system. It was the second open source BSD descendant to be formally released, after 386BSD, and continues to be actively developed. The NetBSD project is primarily focused on high quality design,...

, OpenBSD
OpenBSD
OpenBSD is a Unix-like computer operating system descended from Berkeley Software Distribution , a Unix derivative developed at the University of California, Berkeley. It was forked from NetBSD by project leader Theo de Raadt in late 1995...

, and FreeBSD
FreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...

).

It was originally derived from the first incarnation of elvis
Elvis (text editor)
Elvis is a powerful vi/ex clone, i.e. it resembles the Unix text editor "vi" very much but adds quite a few commands and features. Elvis is written by Steve Kirkendall and is distributed under the Clarified Artistic License which is used by Perl....

, written by Steve Kirkendall, as noted in the README file included in nvi's sources.

Sven Verdoolaege added support for Unicode
Unicode
Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

 in 2000. He also has been developing a GTK+
GTK+
GTK+ is a cross-platform widget toolkit for creating graphical user interfaces. It is licensed under the terms of the GNU LGPL, allowing both free and proprietary software to use it. It is one of the most popular toolkits for the X Window System, along with Qt.The name GTK+ originates from 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 version 1.79 due to licensing differences between Berkeley Database
Berkeley DB
Berkeley DB is a computer software library that provides a high-performance embedded database for key/value data. Berkeley DB is a programmatic software library written in C with API bindings for C++, PHP, Java, Perl, Python, Ruby, Tcl, Smalltalk, and most other programming languages...

 1.85 and the later versions by Sleepycat Software
Sleepycat Software
Sleepycat Software, Inc. was the company primarily responsible for maintaining the Berkeley DB packages from 1996 to 2006.Berkeley DB is a widely used and freely-licensed database software originally developed at the University of California, Berkeley for 4.4BSD Unix, and developers from that...

. nvi is unusual because it uses a database to store the text as it is being edited. Sven Verdoolaeges changes after version 1.79 use locking features not available in the 1.85 database.

There are also reportedly changes to nvi after 1.79 which make nvi less vi
Vi
vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by the Single Unix Specification and POSIX.The original code for vi...

-compatible.

Due to the liberal policy of the BSD license, nvi can vary subtly across the BSDs.

As with the original vi
Vi
vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by the Single Unix Specification and POSIX.The original code for vi...

, nvi is only executable on POSIX/Unix platforms due to its reliance on the curses
Curses (programming library)
curses is a terminal control library for Unix-like systems, enabling the construction of text user interface applications.The name is a pun on the term “cursor optimization”. It is a library of functions that manage an application's display on character-cell terminals .- Overview :The curses API...

/ncurses
Ncurses
ncurses is a programming library that provides an API which allows the programmer to write text user interfaces in a terminal-independent manner. It is a toolkit for developing "GUI-like" application software that runs under a terminal emulator...

 library.

A multilingual version is available as nvi-m17n by Jun-ichiro itojun Hagino.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK