vi

from Wikipedia, the free encyclopedia


vi when editing a hello world program in C

vi ("vi" for "visual") pronounced [ viːˈaɪ ] or [ vaɪ ], in German-speaking countries occasionally also [ viː ], but not "six" or "six" (like the Roman numeral VI) is a free text editor . It was written in 1976 by Bill Joy on an ADM-3A computer terminal for an early BSD version and standardized by POSIX . The name comes from the command of visualthe editor ex . With this command you could switch the line editor to a visual mode.

classification

Line-oriented editors were mainly used until the early 1970s , with ed being a widely used one . Joy built on this, initially also with a line editor, ex . The editor vi was later based on this. vi quickly became the de facto standard editor on Unix .

In 1991 about half of all participants in a Usenet survey used the vi. Even today, the use of vi and its extensions is very widespread, at least in the Unix and Linux world. You can also use this editor in combination with ssh (formerly Telnet or rsh ) to work on other computers in the network .

Due to their relative resource- friendliness, vi or almost all of its clones start faster and require significantly less storage space than, for example, Emacs . On a "rescue disk" has vi nor its place, so it almost all Unix / part today Linux - distributions is.

The original version of Bill Joy was originally neither in the source code nor otherwise freely available, so that there are now a number of clones, some with significant extensions, such as: B. Vim , Nvi, elvis and WinVi, some of which are also available for non-Unix-like systems.

keyboard

KB Terminal ADM3A.svg

The ADM-A3 keyboard used by Bill Joy had only a few other keys besides letters and numbers (here gray). That explains the unusual operation for today's standards. It should also be noted that :without is Umschcalled.

Working modes

Vi has three fundamentally different working modes:

Command mode

When you start vi you are in command mode. Simple commands can be carried out there by pressing various keys, such as “Find word”, “Delete line” etc. From this command mode, the edited file can then : w q returnbe saved and exited, for example by pressing .

Insert mode

Commands like i, aor otake you from command mode to insert mode. (insert mode). The actual input of text is possible here. Pressing takes Escyou back from the insert mode below to the command mode.

Command line mode

Entering :(colon) takes you from command mode to command line mode ("colon mode" or "ex mode"). More complex commands such as finding and replacing text can be executed there. pressing Entertakes you back to command mode. A few exceptions, such as B. the return of the rcommand to the command mode without pressing Escexist.

Vi working modes, svg

Advantages and disadvantages

Due to the different working modes, the operation of vi, compared to other terminal editors such as GNU nano or graphical editors more common today, takes some getting used to. A big advantage of vi, however, is that several commands can be issued one after the other without pressing the Alt-, Strg- or other modifier keys at the same time . It is also possible to delete several words or sentences with a single command.

humor

In the course of the so-called Editor Wars , the followers of vi founded the "Cult of Vi" in response to the Church of Emacs founded by Richard Stallman alias St. I GNU cius . Thereupon they were called by the Emacs followers as imitators ("ape their betters").

literature

Web links

Wikibooks: Vi Command Reference  - Study and Teaching Materials
Wikibooks: Learning the vi editor  - learning and teaching materials

Individual evidence

  1. ^ Christian Gross: Open source for Windows administrators . Charles River Media, Hingham, Mass. 2005, ISBN 1-58450-347-5 , pp. 55 .