HN2new | past | comments | ask | show | jobs | submitlogin

> A standards-conformant implementation of vi is absolutely required to be present

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?

 help



> 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).


This has been addressed in a few realms, primarily shells.

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: