An example of DOS line-endings follows:
![Dos Line Endings in Vim](/images/bb64109e79e80143d9d3d1dbfbb8333b708875b0.jpg)
(note the ^M
)
To convert DOS line endings to Unix without the aid of dos2unix
, in Vim: :%s/^M//g
(use ctrl-v
ctrl-m
to input the ^M
.)
Alternatively, to force Vim to use DOS line endings: :set ff=dos