Tuesday, October 14, 2008

Remove Pesky Dos / Soft Line breaks in VI (VIM)

I hate it when you are trying to import a text file and the importer doesn’t like it cause there are ^M + \n line breaks in the middle of fields….

 

In vi, use:

 

 :%s/\r\n/ /g

 

To turn them into spaces..

No comments: