Vim: Convert ^M to linebreaks
Posted: Tue Oct 24, 2017 8:49 pm
In case you see "^M" characters where linebreaks should be, and "set fileformat=dos" doesn't work - neither does "dos2unix", here's a trick:
Source:
gVim showing carriage return (^M) even when file mode is explicitly DOS
Code: Select all
:%s/\r/\r/g
gVim showing carriage return (^M) even when file mode is explicitly DOS