How to edit a file in Vim with all lines ending in ^M except the last line ending in ^M^J

后端 未结 2 657
难免孤独
难免孤独 2021-01-13 11:50

I have a bunch of files that I need to look at. All lines in these files end in ^M (\\x0D) except the very last line that ends in ^M^J (\\x0D\\x0A).

Obviously, Vim d

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-13 12:16

    Try this:

    :set fileformat=unix
    

    Can't really verify it though, since I don't have that kind of files handy.

提交回复
热议问题