On 23/11/2005, at 9:31, Matt Henderson wrote:
[...] For example, I would love to have access to some video-based tutorials that, by way of example, give me a better overview of how "macros", "snippets", "commands", "bundles", etc. all fit together into the concept that is TextMate. (And these kinds of things are pretty easy to produce these days.)
The Introduction to Rails movie shows TextMate in use with heavy use of snippets and some macros: http://www.rubyonrails.org/media/video/ rails_take2_with_sound.mov
While it doesn't show how this stuff is setup, the snippets/macros used can be found in the Ruby and Rails bundles (in the Bundle Editor).
I have considered starting a screen-cast, and a friend of mine is likely to take over wrt documentation. But the presence of screen- capturing software does not make it an easy task. Good tutorial-style documentation takes very long to produce, and so does coming up with good examples for use in the movies.
As for the things you mention: macros is a way to record and replay your actions. Nothing more.
Snippets is a way to insert templates into your code with placeholders, variables, and real-time substitutions on the placeholders. Here's the syntax for snippets with many examples of use: http://macromates.com/blog/archives/2005/08/25/the-power-of- snippets/ and here's a movie showing off some advanced snippets http://macromates.com/movies/intelligent_snippets.mov which is explained here http://macromates.com/blog/archives/2005/09/02/beta-17- notes/
Commands are shell scripts. The possibilities of shell scripts are limited only by your imagination (since they are really just programs, and can call out to other language interpreters). In the context of TextMate, here are several examples where the HTML output option is used: http://macromates.com/blog/archives/2005/09/28/html- output-for-commands/ -- I'd suggest going through the various commands in the bundle editor to see what else can be done. Many of the commands are scripts to work on the selection.
As for customizing TextMate, that's the 3 building blocks. The extra twist is the ability to limit activation of these to particular subsets of your source via scopes, which is explained here: http:// macromates.com/blog/archives/2005/07/06/introduction-to-scopes/