Remove CR-LF in windows files with vi(m)

If you want to delete the Carriage Return and Line Feed (CR+LF) in windows-created files, you can use the vi(m).

( Because Windows uses CR+LF as Line-End, unix/linux just uses the LF-Character )

Open the file via vim:

vim <WindowsFile>

After opening the file you have to enter the following sequence:


For creating the „^M“ you have to press CTRL+V and CTRL + M, otherwise it would not work!