I like to put a little date banner on files that are like a CHANGELOG. The Insert Comment Banner in Textmate is great for this. You just hit Ctrl+Shift+B and this appears:
And the equal signs on top and bottom adjust as you type in “Banner”. It’s pretty cool. But what I wanted is a timestamp in the banner. So I’d leave Banner highlighted and then right click in Textmate and select “Filter through command” and put the Unix command date in there. That’s great except it puts Fri Jan 20 21:46:13 EDT 2034 in there which is a bit long.</p>
Too long. So here’s what you can do. Go to Bundles->Bundle Editor->Show Bundle Editor. Then go to the Source category. You can filter at the top for Snippets if it’s easier. See this picture.
Then put this code in:
This will give you a banner like this:
And it’ll be the right length automatically. Nice.