I have a file which has been edited in windows with an incorrect setting. All the lines have
At the end of each line.
To search for these in Vim, you can type ctrl+v (to mean “take my next key combination literally”) then ctrl+m. To clean up my file I used:
Where the ^M is typed using Ctrl+V, Ctrl+M. I’ve recorded it as a macro as I seem to be fixing the same thing a lot these days. Hope that helps someone!