Since macOS (originally Mac OS X) is a variant of UNIX, and has been POSIX-certified for a while, I assume it’s always had the vi text editor available. In recent versions, it has come with Vim. Has the system always shipped with Vim specifically, or was there a time when macOS shipped with a different variant of vi?
This capture by the Wayback Machine shows that Vim has been included at least as far back as Mac OS X 10.6.6. Unfortunately, Apple seems to have deleted a lot of old documentation (or at least broken all of the links) so I’m not sure whether you can get older OS versions’ man pages online in this same way.