[TxMt] Macro Recording with Search?

Allan Odgaard allan at macromates.com
Thu Dec 23 09:03:03 UTC 2004

On Dec 23, 2004, at 1:15, David Wooten wrote:

> I've been experimenting a little with the macro recording feature, and 
> one thing I'd find rather useful would be to include a search in it. 
> Is this not yet possible?

That is possible. You can either use the find next/previous actions to 
find what's on the find clipboard (when the macro is replayed), or you 
can use the find window to find a specific string (with specific find 
options), which is then independent of the contents of the find 
clipboard, when the macro is replayed.

> The idea is that one would search for the next instance of a certain 
> word, and then base the rest of the macro off of the location of that 
> word. This is good, for example, for reformatting bbl (bibtex) files 
> in ways that are not supported natively.

When I need a macro which 'starts' its action after a certain string, I 
often have the last action in the macro do the find. That way, I can 
replay the macro repeatedly, until I hear a beep, which indicates that 
there are no more blocks of text that needs to be worked upon (i.e. the 
last find of the last macro replayed fails).

More information about the textmate mailing list