[TxMt] drag command for inserting links to local files

Allan Odgaard throw-away-1 at macromates.com
Fri May 11 09:06:28 UTC 2007


On 9. May 2007, at 22:54, Rob McBroom wrote:

> I created this a while back, but I had forgotten about it until a  
> recent discussion of Drag Commands.
>
> If you're using the pre-insalled Apache under Mac OS X, the  
> DocumentRoot is set to `/Library/WebServer/Documents/`. I try to  
> avoid attachments as much as possible, so I'll usually put a file  
> in that location and just send people a URL that leads them to it.  
> To make this easier, I created a Drag Command that applies to any  
> file in that directory. For example, if I drop /Library/WebServer/ 
> Documents/some.zip in a document, it inserts http:// 
> kendra.oit.gatech.edu/some.zip instead.

That’s a nice idea. I have something akin to this using Quicksilver,  
where if I ⌘⎋ a file while in Finder, Quicksilver will upload it  
to my server, and put the resulting link on the clipboard  
(unfortunately ⌘⎋ fails me quite often as a hotkey).

Anyway, for this bundle item I have two comments:

  1) it doesn’t find my fully qualified domain name, so we need:
     a) a note about how the user can set it up!?!
     b) a fallback variable or so for the domain name
  2) would be nice if it allowed to copy files not in ~/Sites or / 
Library/WebServer/Documents to be copied to some “temporary”  
folder of either location. That way, we can drag arbitrary files to  
the letter, not just those already located in the right location.

> It's currently scoped to "text.mail,text.html" and I usually only  
> use it for e-mail, but perhaps it should be scoped for all "text"?  
> Anyway, I thought this might be a useful addition to the Mail or  
> Text bundle.

I think currently it should be limited to text.mail.

> On a related note, what's the preferred way to say "I thought this  
> might be a useful addition to the XYZ bundle"? :)

Just send it here :)




More information about the textmate mailing list