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
tried a lot of things but the following worked
:%s/\r/\r/g
note: use g if you want the effect on the whole file