I\'m using gVim on Windows. My code shows ^M characters at the end of lines. I used :set ff=dos to no avail. The ^M characters remain
^M
:set ff=dos
I know this has already been answered, but a trick I use is
:%s/\r/\r/g
This replaces the unix carriage returns with the windows CRLF. Just added in case anyone else had issues.