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

前端 未结 10 1497
小蘑菇
小蘑菇 2020-12-22 15:25

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

10条回答
  •  余生分开走
    2020-12-22 16:13

    I know this has already been answered, but a trick I use is

    :%s/\r/\r/g
    

    This replaces the unix carriage returns with the windows CRLF. Just added in case anyone else had issues.

提交回复
热议问题