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
This is probably a bit simple for many of you but on the off chance it's useful.
Based on richq's answer, I found these to be useful in my vimrc. Note, the second one is commented out normally because it makes dd a bit confusing since Vim will wait for another key stroke to work out if it's the mapped ex command.
function! D2u() execute '%s/\r\(\n\)/\1/g' endfunction "map d2u :%s/\r\(\n\)/\1/g
The first is run by typing call D2u()
into ex and the second by pressing D2u
in edit mode.