[TxMt] export bundle and drag command

Allan Odgaard throw-away-1 at macromates.com
Mon Oct 17 17:42:45 UTC 2005


On 17/10/2005, at 12.33, salvo wrote:

> I've made some custom snippet for Perl in bundle. How can I export  
> these ones or the whole bundle to share them?

Custom bundles are stored in ~/Library/Application Support/TextMate/ 
Bundles

It's probably best to make a new bundle (inside TextMate) and move  
your stuff to that, for sharing. I.e. you don't want to share a  
partial “Perl” bundle, but instead a “Salvo's Perl Snippets” bundle,  
or similar.

> And another question: how to use "Drag commands" (i.e. in html)?

Create a new one, set the extension to those you want to catch (e.g.  
png), the scope to which scopes it should apply to (e.g. text.html)  
and then it's just a normal command which produce the snippet that  
gets inserted, when you drop (in this case) png files in HTML documents.

The command can refer to the TM_DROPPED_FILE variable for the file  
which was dropped.

There already is drag commands for images, css files and html files  
in the HTML bundle (to insert img, link, and anchor tags).




More information about the textmate mailing list