From owner-freebsd-questions Sat Jun 9 7:41:58 2001 Delivered-To: freebsd-questions@freebsd.org Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.121.85]) by hub.freebsd.org (Postfix) with ESMTP id 02C4F37B401 for ; Sat, 9 Jun 2001 07:41:55 -0700 (PDT) (envelope-from dleimbac@earthlink.net) Received: from mutt.home.net (1Cust88.tnt1.starkville.ms.da.uu.net [63.30.107.88]) by gull.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id HAA11030 for ; Sat, 9 Jun 2001 07:41:52 -0700 (PDT) Received: (from dave@localhost) by mutt.home.net (8.11.3/8.11.3) id f59EfBe00517 for questions@freebsd.org; Sat, 9 Jun 2001 09:41:11 -0500 (CDT) (envelope-from dave) Date: Sat, 9 Jun 2001 09:41:10 -0500 From: David Leimbach To: questions@freebsd.org Subject: Re: vi Message-ID: <20010609094110.A477@mutt.home.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from jason@jason-n3xt.org on Sat, Jun 09, 2001 at 12:37:21AM -0500 X-Operating-System: FreeBSD mutt.home.net 4.3-RELEASE FreeBSD 4.3-RELEASE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG It seems no one has actually answered your question yet. :) In the early days of unix there was the "ed" editor. It is a line editor somewhat like edlin for DOS [guess where the DOS people got the idea from?]. You could only see one line at a time with ed but it had some really powerful features. Most of the cool sed commands we have today came straight from ed. sed means "stream editor" this means that instead of editing a file you can edit stuff from standard input through a pipe. For example: "cat file | sed 's/Hello/Goodbye/g'" Cat sends a file to standard output. The pipe "|" makes the standard output of the command to the left of it the standard input of the command to the right of it. Sed then takes the standard input and does a substitution of all occurances of "Hello" with "Goodbye" ['s/Hello/Goodbye/'] All of this could be done at the ed command line while editing a file too. "ed filename" and the sed command can be issued here as well. "ex is a derivative editor of ed with some enhancements. VI stands for Visual Interface and actually is a visual interface to the ex editor. Here is the family tree: ed ex sed vi vim elvis [other vi like editors] So you see vi has a long family bloodline to the original UNIX line editing program.. Its basically tradition and the fact that the elders pass the knowledge of vi down to the youthful newbie UNIX users that keeps vi going as the standard UNIX editor. Its also really really lightweight in comparison to emacs which is huge and considered bloated... [I personally like emacs and many a religious war has been fought over the vi emacs argument.... If you read slashdot I am you sure you have seen the banner add for thinkgeek with the two guys screeming their preferred editor name at each other...] Anyway that about says it all.. Understand? Its tradition! Learn vi you will be a better person! :) On Sat, Jun 09, 2001 at 12:37:21AM -0500, Jason Halbert wrote: > Hi All: > > Why is vi the default choice of editor for UNIX and how did it become > the default? I find it cumbersome. > > I'm just curious of it's advantages over joe or pico or any of the > others. > > ---- > Jason > jason@jason-n3xt.org > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message