Andrew Woods Seattle Web Developer

Convert Line Endings In Textmate

December 17, 2010

Goto Text > Filter Through Command

Menu in Textmate "Text -> Filter Through Command"
  • Set Input to “Document”
  • Set Output to “Replace Document”
  • Use this sed one-liner as your command to convert from Unix to DOS:
sed "s/$/`echo -e \\\r`/"
Screenshot of "Filter through command" dialog in Textmate

Convert line endings from Unix to Dos using Sed in Textmate for current document