The latest standard for vi (and the rest of the utilities) can be found here:
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/
The standard for vi is specifically:
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/v...
Yes, Microsoft, this means you!
https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem
Microsoft's native UTF-16 really, really needs an editor that easily saves US7ASCII and UTF-8 correctly, both with LF and CR/LF. The native Windows tools are quite poor in getting this right.
No arguments there. This is all correct. The question is: Is Vim not standards-conformant?
If Vim isn't standards-conformant, I agree some people will expect the original vi to be present.
But if Vim is standards-conformant, do people still want vi to be present? Why?
It's much smaller and standards-compliant. IIRC, Debian started bundling nano instead of vim because nano is smaller (and easier to quit).
One bash behavior oddity is that, when it is called as /bin/sh, this will work:
$ cat pbasher
#!/bin/sh
alias p=printf
p hello\ world!\\n
$ ./pbasher
hello world!
However, changing the shebang to #!/bin/bash results in this: $ ./pbasher
./pbasher: line 3: p: command not found
This is because an alias in a script is a POSIX.2 standard, but this historical bash did not allow this.Forcing POSIX mode enables the alias:
$ cat pbasher
#!/bin/bash
set -o posix
alias p=printf
p hello\ world!\\n
$ ./pbasher
hello world!
In the same way, platforms that care about POSIX.2 compatibility will adjust the behaviors to obtain certification, as bash has done. I saw HP-UX modify ksh88 into sh-posix, and vim also has a VIM_POSIX environment variable that enables a compliant standard mode.There is discussion here:
https://vimhelp.org/vi_diff.txt.html
...the general GNU environment variable to trigger compliance used to be called POSIX_ME_HARDER.