[TxMt] String Formatting and TM Snippets
Allan Odgaard
throw-away-1 at macromates.com
Tue Sep 12 21:52:36 UTC 2006
On 12/9/2006, at 15:13, gwendy wrote:
> [...] As you can see, the snippet currently fills in a couple of
> default columns for both my main table and its versioned partner.
> Is it possible to then begin typing in column definitions for the
> primary table (where the cursor currently ends at $0), and have
> those columns mirrored in the versioned table below?
You may want to look at the existing Rails migration snippets.
However, to trigger a snippet in the “up” part and have that snippet
mirror stuff int he (already created) “down” part, one need to
instead make a command/macro which replace from the caret till the
end of the document/up method with a snippet.
For more info I’d recommend you check out Duane Johnson’s articles on
TextMate (he did all the Rails migration stuff and a lot of other
cool stuff not bundled with TM): http://blog.inquirylabs.com/category/
textmate/
More information about the textmate
mailing list