html tool

2019年10月16日星期三

转:vim中显示windows或者dos的换行符^M


https://www.cnblogs.com/daition/archive/2010/12/20/1911163.html

linux下,如果需要在vim中查看^M,需要使用如下命令:e ++ff=unix % 。


备注:
参考 :https://stackoverflow.com/questions/82726/convert-dos-line-endings-to-linux-line-endings-in-vim


:set fileformat=unix
You can also use mac or dos to respectively convert your file to macintosh or MS-DOS/MS-Windows file convention. And it does nothing if the file is already in the correct format.
For more information, see the vim help :
:help fileformat


没有评论:

发表评论