I am using vim to view XML files created by a Windows app. It is probably a malformed XML file because vim thinks it's opening a Unix file format. So I end up seeing ^M at the end of almost every line.
I don't want to mess with the file, as vim is the only viewer. It is going to be used by other apps, and in fact, may even be in the middle of being written to. I just want vim to interpret <CR><LF> as a Unix carriage return. In case it matters, I typically open files with either
:e path/to/file
:split path/to/file
:vsplit path/to/file
or I might use the netrw plugin. I am using vim 7.4, patches 1-729, built for Cygwin. It is not easy to upgrade in my environment.
P.S. Sorry if the tag is not quite. The posting web page suggested original-vim, but that tag doesn't seem to exist. No other tags in the suggestion list seemed any more appropriate. I am open to suggestions as to a better tag.
set ff=dosfor these files? If so, please add how these files can be identified (location, extension or some other detail) – muru Jan 21 '17 at 08:08:set ffs=dosbefore opening the file. – garyjohn Jan 21 '17 at 18:19:e ++ff=dos yourfile– Christian Brabandt Jan 21 '17 at 21:06:e ++f=dos %. Thanks! Did you want to enter this in as the answer? – user36800 Jan 23 '17 at 16:24