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

前端 未结 10 1498
小蘑菇
小蘑菇 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:02

    tried a lot of things but the following worked

    :%s/\r/\r/g
    

    note: use g if you want the effect on the whole file

提交回复
热议问题