[TxMt] repeat command? Is there/can there be one?

William D.Neumann wdnx at unm.edu
Fri Jan 21 20:27:36 UTC 2005


On Jan 21, 2005, at 7:31 AM, Allan Odgaard wrote:

> I do like the concept of the vim optional count argument, but I'm not 
> sure it's very handy in a mode-less editor like TextMate and/or where 
> you perform sort of gestures to invoke actions rather than have a 
> single letter for each command (some with modifiers/arguments etc).
>
> How do you envision this added to TextMate? Do you want e.g. a dialog 
> to be triggered on a key where one could enter the count argument, and 
> do you then want only the next action (e.g. option-forward delete) to 
> be the single action that gets repeated?

That's pretty much how I envisioned it.  Hit the appropriate hot-key 
which brings up a dialog where you type a number and hit enter, tab, 
the space-bar, or whatever, then you trigger an action by hitting a key 
or selecting a menu option.  Only that action would be repeated, if you 
want more complex actions, you need to roll your own macro and repeat 
that.  For some reason I picture it as being somewhat like quicksilver 
in operation...

> For how many “commands” do you actually think this is useful? And how 
> many repeats would you think it takes before the time saved makes up 
> for the time lost interacting with the extra dialog (and how many 
> repeats do you on average do)?

Well, it's obviously useful for navigation and basic editing commands 
(insert, delete, select, etc).  I can see it being used for macro 
replay (and writing as well, so long as there is a hook into the repeat 
command available).  It is definitely a simple way to workaround the 
single step undo that many people dislike... want to undo the last 100 
characters?  Cmd-Alt-1 (or whatever the hotkey would be), 100, <space>, 
Cmd-Z.  Bam!  Instant block undo.  Undid a bit too much?  Cmd-Alt-1, 
10, <space>, Cmd-Shift-Z.

As for the break-even point, I'm guessing (depending on the contortions 
needed for the hotkey, system delays, etc.) it would be somewhere 
around 5-15.  But that might be optimistic...

> Are you mainly interested in a way to move the caret 
> “programmatically” (i.e. giving number of units to move etc.)? or do 
> you see yourself repeating other commands?

Well [thinking back to my vimming days...], my primary use is for 
cursor relocation, followed fairly closely by basic editing (though, as 
you mentioned, this might be used a bit less in a modeless editor), and 
then repeating macros would have been next most common.

William D. Neumann

"You've got Rita Marlowe in the palm of your hand."
"Palm of my hand?  You haven't seen Rita Marlowe..."

		-- Will Success Spoil Rock Hunter?




More information about the textmate mailing list