[TxMt] Feature request: project templates

Allan Odgaard throw-away-1 at macromates.com
Tue Nov 8 19:14:30 UTC 2005


On 07/11/2005, at 12.28, Chris Jenkins wrote:

> [...] have you considered adding some sort of support for project  
> templates?

Not really -- in principle there should be nothing wrong with having  
a normal (file) template generate a project, although I'd have to  
spot the .tmproj extension.

> [...] be run as a command that can sort of do this, ie: ask for  
> user input for the project name, a location to save the project etc  
> and this is working quite nicely, but it requires a document to be  
> open to run it, which obviously isnt ideal.

Yes, that “requires an open document” constraint definitely needs to go.

If you can program obj-c, there is currently the option of doing your  
template wizard as a tmplugin, see e.g. the Clock Example [1] for how  
to add a menu item to TM (which would open the GUI for creating the  
template, and then do: [[NSApp delegate] application:NSApp  
openFile:aPath] with aPath e.g. being the folder created (then TM  
will open it as a scratch project), or generate the tmproj file (the  
format should be straightforward).

I do have some long-term ideas of retiring the current template  
system in favor of using snippets (with a minimal stub to tell what  
parameters should be requested for the template, which would appear  
as environment variables in the snippets), though it's very long- 
term, but I'll keep projects in mind whenever I get around to it.

[1] http://anon:anon@macromates.com/svn/Bundles/trunk/Tools/Clock% 
20Example%20PlugIn/




More information about the textmate mailing list