[TxMt] Getting to end of selection in macro

Dr. Drang drdrang at gmail.com
Mon Mar 13 04:26:55 UTC 2006


On 3/12/06, Allan Odgaard <throw-away-1 at macromates.com> wrote:
> On 10/3/2006, at 0:20, Dr. Drang wrote:
>
> > [...] Is there a foolproof way of getting the caret to land right
> > after the selection?
>
> What you can do is let the command insert as snippet. You will need
> to escape $, \, and ` in the result, but then you have full control
> over where the caret should go (or what should be selected), after
> having the text piped through the command.

Cute trick. Thank you.

> > 1. Is there a way for a command to call a macro?
> > 2. Can a macro be made to behave differently depending on whether
> > text is selected or not?
>
> Afraid the answer is no to both.

Thought so.

--
Dr. Drang
(master of the two-word sentence)



More information about the textmate mailing list