[TextMate] Feature Request: Per Project Shell Variables

Mats Persson mats at imediatec.co.uk
Tue Oct 19 14:34:27 UTC 2004


On Oct 19, 2004, at 12:11, Allan Odgaard wrote:

>> Here's a really wacky feature request: a way to specify an argument 
>> to the command each time I run it. When I'm developing, sometimes I 
>> want to run "make" then "make set-up-test-data" then "make test", or 
>> do things in a different order.
>
> I think this will be possible when I introduce project-specific shell 
> variables, as requested by Ivan (IIRC).

In a very spooky coincidence I was just writing an e-mail with this 
feature request when the above appeared in my inbox. : )

So here's my take on project-specific shell variables. As a web 
developer I have a number of current projects on the go in my  ~Sites 
folder. For each project I have a number of variables that are common 
and would ideally be possible to collect and auto-enter into new files 
or Macros.

Examples:
Project Dev URL: (local desktop URL)
Project Live URL:
ClientName:
Development Version:
etc etc.

So I was thinking that we could have the following section in the 
.tmproj file, (which is a .plist file really):

<key>ProjectShellVariables</key>
<dict>
	<key>TM_PROJECT_CLIENTNAME</key>
	<string>MacroMates.</string>
	<key>TM_PROJECT_VERSION</key>
	<string>1.0</string>
	<key>TM_PROJECT_LIVEURL</key>
	<string>http://www.macromates.com/</string>
	<key> TM_PROJECT_DEVURL</key>
	<string>http://macromates.dev/</string>
</dict>


Later on there could be a GUI for this functionality as well - sort of 
a copy of Macros/Snippets/Commands window -, but to begin with we could 
open the .tmproj file in TM / Property List Editor and add/change our 
own variables.

If these variables could be accessed in Snippets, Commands and when 
creating new files as well it would be even greater.


Also if the .tmproj file could remember the toggled state of 
groups/directories inside the project drawer  when closing the project 
it would be great as well.


Kind regards,

Mats




More information about the textmate mailing list