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
Actually what worked for me (on 64-bit windows, gVIM: 7.2 ) was:
:set ffs=dos
not just: ff