Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Vi (text editor)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Creation=== [[File:Bill Joy at World Economic Forum (Davos), 2003-01 (cropped).jpg|thumb|[[Bill Joy]], the original creator of the vi editor in 2003]] vi was derived from a sequence of UNIX command line editors, starting with [[Ed (text editor)|ed]], which was a line editor designed to work well on [[teleprinter]]s, rather than [[computer terminal|display terminals]]. Within [[AT&T Corporation]], where ed originated, people seemed to be happy with an editor as basic and unfriendly as ed, [[George Coulouris (computer scientist)|George Coulouris]] recalls:<ref name=coulouris/> <blockquote> [...] for many years, they had no suitable terminals. They carried on with [[teleprinter|TTY]]s and other printing terminals for a long time, and when they did buy screens for everyone, they got [[Tektronix 4014]]s. These were large [[direct-view bistable storage tube|storage tube]] displays. You can't run a screen editor on a storage-tube display as the picture can't be updated. Thus it had to fall to someone else to pioneer screen editing for Unix, and that was us initially, and we continued to do so for many years. </blockquote> Coulouris considered the cryptic commands of ed to be only suitable for "immortals", and thus in February 1976, he enhanced ed (using Ken Thompson's ed source as a starting point) to make em (the "editor for mortals"<ref name="em-source">{{cite web |title=Source code for em |date=February 1976 |work=coulouris.net |url=https://www.coulouris.net/cs_history/em_story/emsource/}}</ref>) while acting as a lecturer at [[Queen Mary, University of London|Queen Mary College]].<ref name=coulouris>''A Quarter Century of UNIX'', by Peter H. Salus, Addison-Wesley 1994, pages 139β142. [https://www.coulouris.net/cs_history/em_story/ (excerpt available online)]</ref> The em editor was designed for display terminals and was a single-line-at-a-time visual editor. It was one of the first programs on Unix to make heavy use of "raw terminal input mode", in which the running program, rather than the terminal device driver, handled all keystrokes. When Coulouris visited [[University of California, Berkeley|UC Berkeley]] in the summer of 1976, he brought a [[DECtape]] containing em, and showed the editor to various people. Some people considered this new kind of editor to be a potential resource hog, but others, including [[Bill Joy]], were impressed.<ref name=coulouris/> Inspired by em, and by their own tweaks to ed,<ref name="interview"/> [[Bill Joy]] and Chuck Haley, both graduate students at [[University of California, Berkeley|UC Berkeley]], took code from em to make en,<ref name="interview"/><ref name=register>{{cite web |last=Vance |first=Ashlee |author-link=Ashlee Vance |title=Bill Joy's greatest gift to man β the vi editor |work=[[The Register]] |date=11 September 2003 |url=https://www.theregister.co.uk/2003/09/11/bill_joys_greatest_gift/ |access-date=2012-06-30 |url-status=dead |archive-url=https://web.archive.org/web/20120513104857/http://www.theregister.co.uk/2003/09/11/bill_joys_greatest_gift/ |archive-date=13 May 2012}}</ref> and then "extended" en to create [[Ex (text editor)|ex]] version 0.1.<ref name="interview"/> After Haley's departure, Bruce Englar encouraged Joy to redesign the editor,<ref name="ex-Acks-bsd4.4">{{cite manual |title=ex Reference Manual |series=4.4 BSD (encumbered, not Lite) |last=Joy |first=Bill |publisher=CSRG, UC Berkeley |format=roff source |url=https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.4BSD/usr/src/usr.bin/ex/USD.doc/ex/ex.rm}} (see Acknowledgments section at end of file)</ref> which he did June through October 1977 adding a full-screen visual mode to ex<ref name="ex-date">{{cite web |title=See dates in copyright headers, ex 1.1 source code |work=minnie.tuhs.org |url=https://minnie.tuhs.org/cgi-bin/utree.pl?file=1BSD/ex-1.1}}</ref>{{emdash}}which came to be vi.<ref name="begriff">{{cite web |title=History and effective use of Vim |website=begriffs.com |url=https://begriffs.com/posts/2019-07-19-history-use-vim.html#history |access-date=2021-08-27}}</ref> vi and ex share their code; vi is the ex [[executable|binary]] launching with the capability to render the text being edited onto a [[computer terminal]]{{emdash}}it is ex's visual mode.<ref name="begriff"/> The name ''vi'' comes from the abbreviated ex command (<code>vi</code>) to enter the visual mode from within it. The longform command to do the same was <code>visual</code>,<ref name="begriff"/><ref name="exman">{{cite manual |last=Joy |first=William N. |author-link=Bill Joy |orig-date=November 1977 |title=Ex Reference Manual Version 1.1 |date=November 1977 |chapter=Command summary |location=Berkeley, CA |page=8 |url=https://begriffs.com/pdf/ex-manual.pdf |url-status=live |archive-url=https://web.archive.org/web/20200414143456/https://begriffs.com/pdf/ex-manual.pdf |archive-date=14 April 2020}}</ref> and the name ''vi'' is explained as a contraction of ''visual'' in later literature. <code>vi</code> is also the [[command (computing)|shell command]] to launch ex/vi in the visual mode directly, from within a [[shell (computing)|shell]].<ref name="begriff"/> According to Joy, many of the ideas in this visual mode were taken from [[Bravo (editor)|Bravo]]{{emdash}}the bimodal text editor developed at [[Xerox PARC]] for the [[Xerox Alto|Alto]]. In an interview about vi's origins, Joy said:<ref name="interview"/> <blockquote> A lot of the ideas for the screen editing mode were stolen from a Bravo manual I surreptitiously looked at and copied. Dot is really the double-escape from Bravo, the redo command. Most of the stuff was stolen. There were some things stolen from [[Ed (text editor)|ed]]βwe got a manual page for the Toronto version of ed, which I think [[Rob Pike]] had something to do with. We took some of the regular expression extensions out of that. </blockquote> [[File:KB Terminal ADM3A.svg|thumb|upright=2|right|[[ADM-3A]] terminal keyboard layout]] Joy used a [[Lear Siegler]] [[ADM-3A]] terminal. On this terminal, the [[Escape key]] was at the location now occupied by the [[Tab key]] on the widely used [[IBM PC keyboard]] (on the left side of the alphabetic part of the keyboard, one row above the middle row). This made it a convenient choice for switching vi modes. Also, the [[arrow keys#HJKL keys|keys ''h'',''j'',''k'',''l'']] served double duty as cursor movement keys and were inscribed with arrows, which is why vi uses them in that way. The ADM-3A had no other cursor keys. Joy explained that the terse, single character commands and the ability to type ahead of the display were a result of the slow [[baud rate|300 baud]] modem he used when developing the software and that he wanted to be productive when the screen was painting slower than he could think.<ref name=register/>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Vi (text editor)
(section)
Add topic