Using the vim :source command in a vimscript file with dos line outputs gives me errors that cannot deal with ^M characters.
The ^M characters are part of the dos line endings, but not UNIX line endings. Therefore, the :source file :source trying to use a unix file.
The fact is that I am setting :set fileformats=unix,dos . When opening and editing a file (not :source: -ing), there are no problems with line endings. Vim sees the file with the end of the final board, and according to fileformats it is configured itself.
:help fileformats gives only the most common key that on dos systems, if you have :set fileformats=unix,dos , vim performs a special discovery that it should use (and as an irrelevant detail this detection :source refers to the ends of the mixed line otherwise than when opening files).
I am on a modern Mac system, how can I get it to :source dos line ending file?
source share