This manual covers TextMate 1.5.1 — Go to TextMate 2 manual
TextMate supports recordable macros. A macro is recorded by selecting Macros → Start Recording from the Bundles menu.
While recording, a red dot will pulsate in the right part of status bar and all text editing actions are recorded together with things like Find, running commands, inserting snippets etc. When done, you select Stop Recording and can either replay the recorded macro or save it for later use.
It is possible to set whether or not the macro should use a local clipboard while being executed. The local clipboard is generally advantageous (thus the default) but sometimes you may want the macro to affect the “real” clipboard and can disable this option.