in reply to Re: crlf to \n
in thread crlf to \n

In vim you can use 'set ff=dos' or 'set ff=unix' to save file with desired line-endings. So you can load file into vim, type :set ff=unix, and save file.

Replies are listed 'Best First'.
Re^3: crlf to \n
by Intrepid (Curate) on Apr 03, 2009 at 03:41 UTC

    It's possibly worth noting that merely changing the filetype fileformat (ff) in Vim won't repair a file which has a mix of *nix and dos line-endings, and because of the still massive userbase of a few specific Microsoft tools (that are brain-dead on this score), such files are rather commonly encountered. In such a case one has to actively do something, and if one wants to do something inside Vim, it ought to work to do what dwm042 wrote in reply above.