I found project called The Traditional Vi, but I think that description, readme and manual don't provide exact information about compliancy with POSIX. I tried looking for other implementations that meet the requirements, but with no luck. I'm wondering, are there any POSIX compliant vi implementations? Thanks.
There are a couple of vi clones besides the traditional ex-vi, that claim to be compatible to traditional vi. However I am not sure, if all meet complete POSIX specs and in the past, there were at least some contradictions between traditional vi and POSIX specs (think of multibyte text, regex flavors, undo and such).
For finding out, if they are compliant, I believe you will have to find out and compare against the POSIX specs. I believe there is also a POSIX test suite available, but not sure if it includes vi behaviour tests (and if so how comprehensive it is)
Vim has a special mode for POSIX compliance, which you can enable by setting the
$VIM_POSIX environment variable to a non-empty value.
:help posix, which explains it:
In 2005 the POSIX test suite was run to check the compatibility of Vim. Most of the test was executed properly. There are the few things where Vim is not POSIX compliant, even when run in Vi compatibility mode.
$VIM_POSIXenvironment variable to have
'cpoptions'include the POSIX flags when Vim starts up. This makes Vim run as POSIX as it can. That's a bit different from being Vi compatible.
That section of the docs also goes into details of differences between Vim (even in Vi compatible mode) and POSIX, and why the differences exist.
See also the
'cpoptions' that are only enabled in POSIX mode. Vim option
'cpoptions' allows granular control of all compatibility settings.