[Beowulf] Re: Religious wars

Bob Drzyzgula bob at drzyzgula.org
Thu Jul 24 02:50:00 PDT 2008


On Wed, Jul 23, 2008 at 07:23:00PM -0400, Robert G. Brown wrote:
> 
> On Wed, 23 Jul 2008, Bob Drzyzgula wrote:
>
>>
>>>> vi back then was little more than a shell on ed IIRC
>>>
>>> It was (for nvi, is) the visual mode of ex, which is/was an extended
>>> line editor in the lineage of ed, kind of an extended ed.
>>
>> Correct. In ex you would enter the command "vi" at the
>> colon-prompt to enter visual mode. You should still be
>> able to do this on any system with vi installed -- give
>> it a try! :-) FWIW, the shell command "vi" simply fires
>> up ex in that mode to start with.
>
> Fires or fired -- I have no idea what vim does now.  I'd have thought
> that it long ago divorced itself from ed (or em, en, ... ex) at the
> source level.

On an ubuntu system here:

bob at ubi:~$ ls -l /usr/bin/vi
lrwxrwxrwx 1 root root 20 2008-06-25 04:55 /usr/bin/vi -> /etc/alternatives/vi
bob at ubi:~$ ls -l /etc/alternatives/vi
lrwxrwxrwx 1 root root 17 2008-06-25 04:55 /etc/alternatives/vi -> /usr/bin/vim.tiny
bob at ubi:~$ ls -l /usr/bin/vim.tiny
-rwxr-xr-x 1 root root 703496 2008-01-31 07:26 /usr/bin/vim.tiny
bob at ubi:~$ ls -l /usr/bin/ex
lrwxrwxrwx 1 root root 20 2008-06-25 04:55 /usr/bin/ex -> /etc/alternatives/ex
bob at ubi:~$ ls -l /etc/alternatives/ex
lrwxrwxrwx 1 root root 17 2008-06-25 04:55 /etc/alternatives/ex -> /usr/bin/vim.tiny

Thus at least today, with vim, it appears that ex just starts up
vi *not* in visual mode. But that's just a matter of what you
call the executable -- the main point is that they are typically
the same executable, or at least they have been for as long as I've
been using Unix. In earlier systems they may well have been hard
linked rather than soft linked, and thus the question of which
was the real name of the executable was moot.

> But I used that trick (hopping from ed/ex into and out of
> vi) fewer times than I have fingers on one hand back in the day.  Why,
> if one had fullscreen, would one ever use single line?  Unless, of
> course, one was working on a genuine tty lineprinter, which I
> exceedingly rarely had to do (gnashing teeth most of the time) because
> the console had crashed somehow and yes, we had a teletype console to
> log all the messages.

The other reason is if you are working on a system that is so
broken that termcap (or terminfo or whatever) isn't set up
correctly. In the early days of working with Suns this was
frequently the case, IIRC, in single-user mode.  Your choices
then were usually ed or ex, and ex was a lot more familiar
than ed if you were used to vi.

--Bob




More information about the Beowulf mailing list