[TxMt] Combining snippets and commands?

Charilaos Skiadas cskiadas at uchicago.edu
Tue Feb 21 21:47:46 UTC 2006


On Feb 21, 2006, at 3:38 PM, Charilaos Skiadas wrote:

> You could do this with ruby for instance:
> #!/usr/bin/env ruby
> print "[${1:description}][${2:id}]$0" + STDIN.read + "\n[${2:id}]: $ 
> {3:href}"

oops, spoke too soon. You'll want to escape all $ in STDIN.read, so:
print "[${1:description}][${2:id}]$0" + STDIN.read.gsub('$','\\$') +  
"\n[${2:id}]: ${3:href}"

Haris



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060221/8fbf458c/attachment.html>


More information about the textmate mailing list