[TxMt] Re: repeat scratch macro
mlarocque at prolumina.com
Mon Sep 11 16:42:55 UTC 2006
On 2006-Sep-11, at 09:36, Jacob Rus wrote:
> Andreas Wahlin wrote:
>> I sometimes find myself reformating big chunks of code (html) and
>> then i usually build a little scratch macro, and then i just hit
>> shift +command+m lots of times to go through the code. while this
>> works, is there an easy way to say something like "do this until
>> end of file" or simmilar?
>> perhaps make the macro dependant on finding the next text string
>> of something until the end or something?
> Interestingly, I was talking to Allan about this yesterday. I also
> often end up repeating a scratch macro lots of times in a row. I
> asked if we could get some kind of "do scratch macro for each line
> in selection" action, and he said that it would be better to just
> have some sort of "repeat macro for selection" menu option that
> would perform a scratch macro repeatedly starting at the beginning
> of a selection and going through the end of it. Apparently it
> would need to make sure that the macro always steps forward, but
> there may be some way to do that. So anyway, in response to your
> question, it's being thought about, and we'll hopefully see a
> solution sometime.
Ah, a subject that has been bugging me for some time...
Here's something additional to think about. What I _really_ miss from
Emacs is the repeat-next command functionality (see also Ctrl-u). My
workflow often consists of creating a scratch macro to do _splat_.
I'll then want to repeat it a number of times, ranging from a few to
several thousand. I would then do:
ESC-6 Ctrl-x e
to repeat the macro 6 times. Ctrl-U is a 'repeat-modifier',
multiplying the repeat by 4 each time, such that
Ctrl-u Ctrl-u Ctrl-U Ctrl-x e
would repeat the macro 64 times (4x4x4).
_This_ is something that I really miss in TextMate. Any thoughts
about adding something like this?
Chief Cook and Bottle Washer
Prolumina Communications Inc.
More information about the textmate