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.
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.
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.
Vi has three fundamentally different working modes:
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 .
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.
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.
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").
- Morris I. Bolsky: UNIX Text Editor - The vi Manual . Carl Hanser & Prentice-Hall International, 1988, ISBN 3-446-15128-1 .
- Arnold Robbins: vi editor in a nutshell . O'Reilly Verlag , ISBN 3-89721-213-7 .
- Boor, Hutter, Pribas: vi reference manual . Prentice Hall , ISBN 3-8272-9533-5 .
- The Traditional vi Source code of the original vi, with adaptations to compile on modern Unix systems
- Link catalog on Vi at curlie.org (formerly DMOZ )
- vi-Cheat-Sheet The Semi-Official IBM developerWorks vi-Cheat-Sheet (English)
- vi reference card (PDF; 58 kB; 1 page) vi reference card (English)
- The Vi Lovers (English)
- vi-Cheat-Sheet (German)
- The source code of the original vi in versions 1.1 to 3.7 , compilable on current Unix systems
- Christian Gross: Open source for Windows administrators . Charles River Media, Hingham, Mass. 2005, ISBN 1-58450-347-5 , pp. 55 .