Hi,
In a .sublime-project file it seems impossible to give a path that contains environment variables in it.
At work we use Perforce as source control tool, and time to time we create different branches of a project. Perforce is not like Git or Mercurial, its branches are in fact copies to a different file system location.
So we end up having something like:
C:\OurNiceProject\Main\...
C:\OurNiceProject\Branch1\...
C:\OurNiceProject\Branch2\...
Now to cope with this, we have a system-wide environment variable that tell us the “active” branch, the one that I’m supposed to work on, at a specific moment.
So in my .sublime-project I could use it and have the content of it being dynamically updated. (for dynamic I mean when the variable change and I re-open Sublime)
example:
{
"folders":
[
{
"name": "Active Branch"
"path": "C:/OurNiceProject/%ACTIVE_P4_BRANCH%"
}
]
}
Unfortunately environment variables in .sublime-project’s paths, are not picked up and I have to undergo the tedious process of updating them every and each time I switch Perforce branch.
This is just an example, but it could also help to use the same .sublime-project on different computers, maybe also on different OS if the variable syntax in the path can be unix style also on windows (obviously my example is for windows, but again, it is just an example)