11

Is there a simple way to replace commas with tabs in Textmate, hopefully using the Edit > Find (command F) function?

I've tried /t and '/t' and haven't been able to find documentation about the correct syntax. Also, trying to avoid writing a Ruby script to do it, if possible.

Milktrader
  • 9,278
  • 12
  • 51
  • 69
  • RemoteSojourner's answer is perfect, but I'll go ahead and point out that a 'script' for this would be extremely easy too - Use "Text > Filter Through Command..." with the command `tr , '\t'`. I find the "Filter Through Command..." operation extremely useful - with tools like awk and sed you can do some pretty nifty stuff with simple shell one-liners that look like line noise ;) – mokus Feb 07 '11 at 14:56

2 Answers2

25

If you need to insert a newline or tab character into either of the text fields, you can hold down option (⌥) while pressing the tab (⇥) or return (↩) key. This will insert a literal tab or newline character.

RemoteSojourner
  • 733
  • 5
  • 6
3

Try pressing alt+tab in the replace field or just copy paste tab character there.

Heikki
  • 15,329
  • 2
  • 54
  • 49