I'm trying to make a key binding to open up my favorite git application with current Sublime Text 3 $project_path folder, but somehow Sublime Text 3 doesn't convert the variables into the actual path.
Below you can find my current keyboard bindings file.
[
{
"keys": ["super+ctrl+alt+g"],
"command": "exec",
"args":
{
"shell_cmd": "open -a Gitbox $project_path"
}
}
]
$project_path doesn't convert into the actual project path... What am I doing wrong? Should I use a "Build System" instead? I looked into build systems but the problem there is that you would have to select a scope of files (for example *.rb) and I want this keyboard shortcut to be valid for all my projects/files.
In textmate2 the same shortcut was easily achieved by creating a new "Command" in the Bundle Editor and assigning a shortcut to it. The command then would be:
#!/usr/bin/ruby
exec "open -a Gitbox '#{ENV['TM_PROJECT_DIRECTORY']}'"
So I'm trying to achieve this same thing in Sublime Text 3 but something is going wrong.
Thanks!