[TxMt] drag commands

marios tmtxpstuff at consking.com
Thu Oct 5 03:32:38 UTC 2006


marios wrote:
> 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.
>>
>>
>>
>>
>>     
Sorry,again

Lets say, in the above example leaving Thorsten Beckers excellent Ruby
solution in place, in order to strip off hte file exension, would one
need to expand $TM_DROPPED_FILE first again, before the pattern match
and replacement take place ?

I tried to play around with it in UNIX scope, to avoid typos, but no luck.

regards, marios



More information about the textmate mailing list