From Stackoverflow: The ^M is a carriage-return character. If you see this, you’re probably looking at a file that originated in the DOS/Windows world, where an end-of-line is marked by a carriage return/newline pair, whereas in the Unix world, end-of-line is marked by a single newline. If you have a file with ^M at the end of some lines and you want to get rid of them, use this in Vim: :%s/^M$//g Press Ctrl+V Ctrl+M to insert that ^M.
No comments yet. Log in to reply on the Fediverse. Comments will appear here.