vi editor problems under Mojave
I upgraded to Mojave on 4 different Mac's (2 iMac, Mac air, MacBook pro) and all now have problems with the vi editor (VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Aug 17 2018 17:24:51)).
What happens is that when a file is opened, or closed, vi often inserts a string at the top of the file,
consisting of as anything from 1 stray character to 1-2 lines of text. Usually this text looks like something that was earlier deleted or put into the stack. This usually breaks the file (if it is html, or C code, or TeX), or it just leaves stray garbage (if it is e.g. a text file).
Either way it is a major annoyance.
I've been using vi for about 25 years and I've never seen this behavior before. Suggestions?
iMac Pro