gVim showing carriage return (^M) even when file mode is explicitly DOS

This happens when you have a mixture of Windows line endings and Unix ones. If you have 100 lines, 99 are \r\n and one is \n, you’ll see 99 ^M characters. The fix is to find that one line and replace it. Or run dos2unix on the file. You can replace the Windows line endings with:

:%s/\r\(\n\)/\1/g

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)