Docs > Config > Project > Tasks
< Back
Example of project configuration with a task:
{
"tasks": [
{
"_description": "Show the current file changes from git",
"name": "diff",
"key": "F7",
"cwd": "{workspaceFolder}",
"args": ["meld", "{file}"]
}
]
}
Details:
name: task identifier, will be available in the commandbar completionkey: optional keybinding, only F4 to F7 keys are allowed currentlycwd: optional working directoryargs: array for the command and its parameters
Variables substitution uses the {variableName} syntax.
A list of predefined variables is available, based on VS Code ones (reference).
Environment variables can also be used, using the “env_” prefix,
like {env_MY_ENV_VAR}.
When running as flatpak, you may have to use the flatpak-spawn wrapper
to escape the sandbox, and setup the corresponding D-Bus permissions.
< Back