Batch append text in TextMate

TextMate 2 icon

Good evening. How was your Sunday?

You could do the following so many ways, with so many tools. If you're already in TextMate though, you can still use your regex foo to do some pretty cool stuff to ranges of files.

Case in point: say you have a folder, and you want to append a string to the end of each file.

  1. Hit ⌘F for find
  2. Under "Find", type "Z"
  3. Under "Replace", type "Z" followed by your escaped string
  4. Under "Options", select "Regular Expression"
  5. Under "In", choose the folder containing your target text files
  6. Hit "Replace All"