[TxMt] Re: How to save document within macro/command?

Hans-Jörg Bibiko bibiko at eva.mpg.de
Fri Jan 16 20:18:30 UTC 2009


On 16.01.2009, at 18:16, Michael J. I. Jackson wrote:

> Hi all,
>
> I'm writing a macro right now and I'd like Textmate to save the  
> document when the macro is finished running. Unfortunately, when I  
> save the document while the macro is recording, the save operation  
> is not recorded. Any ideas?

For that purpose I have a simple helper tmcommand "saveMe":

- Bundle Editor > New Command
- Save: Current File
- Command:
- Input: None
- Output: Discard

* Command: is really empty!


Then record your macro and as the last action call this helper command  
"saveMe".
Save your macro and that's it. The nice side-effect is that TM will  
ask you for a name if the doc wasn't saved before.

--Hans







More information about the textmate mailing list