>
> I don't expect it, I'm doing my best to configure vi in such a way that it
> becomes consistent across platforms. I couldn't care less about the real
> name of the program I get when I invoke vi (at some time in the past,
> elvis and later nvi were the "vi" of the Linux distributions I was using).
In that case you should coplain that something that is not 'vi' is called
'vi' on some platform. Not complain that the real 'vi' does not conform
to the behaviour of what is called 'vi' on some platform.
I once used a program called 'ed' that in the case of an error did not
just print a question mark, but printed a long line explaining the error.
But I did *not* complain that there was no portable way to avoid that
behaviour... (The worst thing was that it was coming through a 1200 baud
link to Argonne in Chicago.)
>
> That's due to your ignorance. There are also SystemV vi, POSIX vi, SUSx
> vi.
Probably. The first System V box I met in, say, 1985. By that time I had
already used BSD for some 6 years. The BSD subset I was comfortable with,
so when I first saw a System V vi, I did not feel the urge to find what it
could do more than BSD vi.
> From the Solaris man page:
>
> The standard Solaris version of vi will be replaced by the
> POSIX.2-conforming version (see standards(5)) in the future.
Yup, and if you had looked further you would have known that
/usr/xpg4/bin/vi is that POSIX.2-conforming version (I think).
This portion of the man page only says that /usr/bin/vi will be
replaced by /usr/xpg4/bin/vi.
>
> OK, what are the "real" names of "the standard Solaris version of vi",
> SystemV vi, POSIX vi and SUSx vi?
Those are not clones. But 'vim' very definitely *is* a clone, and
originally not very conforming to 'vi' behaviour either.
>
> It is similar to complaining that a system supposend to follow a standard
> doesn't follow it completely. See the above quote from the vi man page
> on Solaris.
I do not know. Is "set expandtabs" in Posix.2 vi? What has Posix.2 to
say about shifting lines? So I do not know in what way 'vi' does not
follow standards. The 'vi' in /usr/xpg4/bin on Solaris (which is
ostensibly Posix.2 complliant) acts the same way.
That Bill Joy decided that a shift would mean recalculation of the total
indent is perhaps unfortunate, but understandable for that time (1978).
Moreover, at that time adding four spaces at the end of white space
already containing four spaces and not replacing things by a HT would
indeed mean a waste of resources. (Note that it adds nothing to an
empty line either...) On the other hand, which way you do it in a
number of cases you have to replace white-space characters in the
original by other white-space characters anyway.