[TxMt] drag commands

marios tmtxpstuff at consking.com
Thu Oct 5 03:19:13 UTC 2006


Allan Odgaard wrote:
> On 1/10/2006, at 14:26, marios wrote:
>
>> [...] When I use option, and drag the File, The document window
>> looses focus and disappears under the cursor, when the file gets
>> dropped in the document window, so I changed the whole thing to use
>> Shift instead, where I get the expected behavior.
>
> What’s happening here is, that if you ⌥-click another application,
> your active application will hide. So you need to first drag the icon,
> then press ⌥.
>
>
Ok, I see. thanks a lot.
> The easiest is to use the regexp substitution capabilities of TextMate
> snippets.
>
> So use something like ${TM_DROPPED_FILE/.*\/|\..+//g} — that ought to
> strip both the leading directories and the trailing extension.
>
>
>
>
I still couldn't get the above going, I tried to escape also the above
variable and if I do echo the above snippet, as a drag command causes
a crash.
Shouldn't really  get my fingers on this too much, since it is not
possible to show the output as a tooltip, tends to be a little dangerous.

If I just wanted to echo the filename and strip all the rest off, so I
can reuse it and store it in a variable, what would be the best approach ?

regards, marios



More information about the textmate mailing list