A next step would be to use that approach to combine TM's Template and Snippet technology (the easy way):
E.g. an HTML template: - create a normal template - content: mate "$HOME/untitled.html" osascript -e "tell app "TextMate" to insert "`cat index.html | perl -pe 's/"/\\"/g'`" as snippet true"
- add a new template file - content: <html> <body>
Hello, I'm a "template"
Date: `date +%Y-%m-%d` Name: ${1:$TM_FULLNAME} Organisation: $TM_ORGANIZATION_NAME
Title: ${2:Write here your title}
Text: ${3:Write here your text}
${0:} </body> </html>
here the template:
--Hans