On Jan 31, 2007, at 9:51 AM, Rob McBroom wrote:
Someone will correct me if I'm wrong, but I don't think you can have TextMate do this for you just by altering settings.
Correct, it will not.
You could probably create a command that goes through your document and replaces 8 spaces with a tab character. To get even fancier, you could probably create a command that does this and saves the document and bind this command to ⌘S, so when you save the file, it gets formatted the way you want.
That is definitely possible. Perhaps there are already some solutions in the list archives, this kind of thing has come up before.
I'm not sure if TextMate will let you use Tab as a key equivalent for a command, but if so, you could make it even more automated (probably what you want) by having it do a search/replace on the current line every time you hit the Tab key. This might screw up the cursor position though.
Tab is the key associated to tab triggers. So you could use it as a key equivalent, but that would disable all key triggers.
Actually what would probably work is setting tab as a "tab trigger". Then the command will only be triggered if it is preceded by a tab (and will swallow that tab).
Haris