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
I usually use the following to cleanup my line endings:
:g/^M$/s///
To get the ctrl-M I usually type ctrl-Q, then ctrl-M and it puts it in. (In some environments it may be ctrl-V then ctrl-M.) I don't know why, but I find that one easier to remember than rq's.
Don't forget to do :set ff=dos
as well, or you'll end up saving with UNIX line endings still.