[TxMt] Combining snippets and commands?

Dr. Drang drdrang at gmail.com
Tue Feb 21 19:45:51 UTC 2006


When writing Markdown, I like to use reference-style links:

     [link text][id]
       .
       .
     <rest of text>
       .
       .
     [id]: http://www.site.com

I've written a snippet that does some of what I want:

     [${1:description}][${2:id}]$0
     [${2:id}]: ${3:href}


but it puts the reference on the line below the link rather than at  
the bottom of the file. Although I haven't done it, I suspect that  
writing a command that takes the link label line and puts it at the  
bottom of the file wouldn't be too difficult. But before I give it a  
try, I'd like to know if it's possible to combine the snippet and the  
command into a single instruction that allows me to enter the 3  
pieces of information, puts the link label at the bottom of the file,  
and leaves the caret back at the [id].

--
Dr. Drang





More information about the textmate mailing list