I need to reference the Windows environment variables from the Sublime Text 2 settings files (Package-Name.sublime-settings files), in particular %APPDATA%and%TMP%
Is this possible, and if so, how?
For example, here is a line from one package parameter, which should work for several users, therefore with different user names:
"backup_dir": "C:\\Users\\Username\\AppData\\Local\\Temp\\SublimeBackup"
As an example, here is the problem that I just ran into: I have a Sublime Text 2 installation that works from multiple computers (i.e. I copy my data to save settings, etc. between multiple installations), but I run the following command:
{ "caption": "Backup to Server (Local to Server)", "command": "exec", "args": { "cmd": ["local-to-server.cmd"] } },
Unfortunately, the file "local-to-server.cmd" refers to the current open file in Sublime Edit, so this command rarely works. What I need:
{ "caption": "Backup to Server (Local to Server)", "command": "exec", "args": { "cmd": ["%APPDATA%\Sublime Text 2\Packages\User\local-to-server.cmd"] } },
Or a similar way of referencing a common location, which I can then build a relative path.