macros icon indicating copy to clipboard operation
macros copied to clipboard

execute external command

Open skest3qc opened this issue 7 years ago • 1 comments

Hi, i would like to execute WinMerge with the path of the currently opened path, i do not know the command to execute external commands.

skest3qc avatar Apr 24 '17 08:04 skest3qc

Try something like this:

// User Settings
{
  "macros": {
    "runBuild": [
      {"command": "workbench.action.tasks.runTask", "args": "build"}
    ]
  }
}

You'll also need to create a tasks.json:

// tasks.json
{
    "version": "0.1.0",
    "tasks": [
        {
            "taskName": "build",
            "command": "gulp",
            "args": ["build"],
            "isShellCommand": true
        }
    ]
}

See https://code.visualstudio.com/docs/editor/tasks#_binding-keyboard-shortcuts-to-tasks

YMMV, as bugs with runTask have been reported: https://github.com/Microsoft/vscode/issues/6550#issuecomment-296962459

xoob avatar May 03 '17 09:05 xoob