[TxMt] Re: Emulating keyboard activity with commands

Steven Arnold thoth_amon at mac.com
Wed Oct 3 01:20:52 UTC 2012


Hi Tim,

On Oct 2, 2012, at 7:56 PM, Timothy Bates <timothy.c.bates at gmail.com> wrote:

> If the \n preceding a line is in the selection, then a command setting the selection to "" will erase the newline.

This is a clever idea, but I am not sure how to increase the selection from the current line to the current line plus one character.  Do you have a code sample for that, or can you point me toward some resources that might document how that sort of thing can be done?

> Macro recording will be great when it comes (I'm actually waiting till TMs internal states like dynamic selections can be played with in bundle commands and snippets).

Definitely.  Editors like jEdit translate macros into a program.  I like that idea.  Everything that can be done in a macro is essentially translatable to a series of commands.

> If the example really is simply "do what backspace does when a line and the preceeding feed are selected", then that comes built-in and bound to backspace :-)

But I don't know how to make that happen in an automated way.  Are you saying just hit the backspace key manually each time?  I grant that's not much work, but it's annoying.

Regards,
steven


More information about the textmate mailing list