VSCode
To run git-gamble
from VSCode
Setup
Add this in your .vscode/tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Gamble fail",
"type": "shell",
"command": "direnv exec . git gamble --fail",
"group": "test",
},
{
"label": "Gamble pass",
"type": "shell",
"command": "direnv exec . git gamble --pass",
"group": "test",
},
{
"label": "Gamble red",
"type": "shell",
"command": "direnv exec . git gamble --red",
"group": "test",
},
{
"label": "Gamble green",
"type": "shell",
"command": "direnv exec . git gamble --green",
"group": "test",
},
{
"label": "Gamble refactor",
"type": "shell",
"command": "direnv exec . git gamble --refactor",
"group": "test",
},
]
}
Remove direnv exec .
if you don't use DirEnv yet
Execute
Using command palette
- Open the Command Palette (F1 or CTRL + Shift + P)
- Select
Tasks: Run Task
- Select the task (e.g.
Gamble refactor
)
Using shortcuts
You can bind keyboard shortcuts
For example
[
{
"key": "ctrl+g ctrl+f",
"command": "workbench.action.tasks.runTask",
"args": "Gamble fail"
},
{
"key": "ctrl+g ctrl+p",
"command": "workbench.action.tasks.runTask",
"args": "Gamble pass"
},
]
Using buttons in the sidebar
Task Explorer extension can be installed to trigger using click