Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jun 2001 09:41:10 -0500
From:      David Leimbach <dleimbac@earthlink.net>
To:        questions@freebsd.org
Subject:   Re: vi
Message-ID:  <20010609094110.A477@mutt.home.net>
In-Reply-To: <JEENJJEOICOIFPANEHOOKEAGCBAA.jason@jason-n3xt.org>; from jason@jason-n3xt.org on Sat, Jun 09, 2001 at 12:37:21AM -0500
References:  <JEENJJEOICOIFPANEHOOKEAGCBAA.jason@jason-n3xt.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010609094110.A477>