[TxMt] Absolute path with $TM_DROPPED_FILE?

Kyle Barrow kyle at pukupi.com
Wed Nov 23 03:08:35 UTC 2005


Thanks for your quick response. ${TM_DROPPED_FILEPATH# 
$TM_PROJECT_DIRECTORY} is just what I needed.

Kyle

On Nov 23, 2005, at 11:59, Allan Odgaard wrote:

> On 23/11/2005, at 3:47, Kyle Barrow wrote:
>
>> I've only been using TextMate a day, like it, but am struggling to  
>> find resources on $TM_DROPPED_FILE, etc.
>
> Most “missing” documentation is in the release notes (Help -> Show  
> Release Notes):
>
> ----------8<----------
> When the command is executed, the normal TM-variables are available  
> and additionally there is:
>
>    TM_DROPPED_FILEPATH: the absolute path of the file dropped.
>    TM_DROPPED_FILE: relative path of the file dropped (relative to  
> the document directory).
>    TM_MODIFIER_FLAGS: the modifiers which were held down when the  
> file got dropped. This is a bitwise or in the form: “SHIFT|CONTROL| 
> OPTION|COMMAND” (in case all modifieres were down).
>
> The current directory is set to that of the document.
> ---------->8----------
>
>> In HTML, I would like links created with $TM_DROPPED_FILE to use  
>> absolute not relative paths to the project root and I would  
>> appreciate any info on how to do this.
>
> I'd think you want: "${TM_DROPPED_FILEPATH#$TM_PROJECT_DIRECTORY}"
>
> This should chop off the project directory from the path of the  
> dropped file.
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>

-- 

mobile web gear | pukupi.com | 34°40'n 135°30'e





More information about the textmate mailing list