Skip to main content
Add syntax highlighting to first code block and fix idiosyncratic spacing.
Source Link
Raine Revere
  • 32.7k
  • 6
  • 44
  • 59

Update: released for vscode v1.77, more at run multiple commands like a macro.

You are able to do this:

{
  "command": "runCommands",
  "key": "alt+r",    // whatever keybinding
  "args": {
    "commands": [
                              // commands to run in sequence
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  }
}
{
  "command": "runCommands",
  "key": "alt+r", // whatever keybinding
  "args": {
    "commands": [
      // commands to run in sequence
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  }
}

The command runCommands is built-in, so no extension is necessary for your use case. But see the link above, some use cases might require a macro extension.


Previous answer:

You would need a macro extension to run multiple commands from one keybinding.

I now use multi-command and there are other macro extensions now.

You can use this keybinding (in your keybindings.json) with the multi-command extension - no need for anything in settings.json:

{
  "key": "oem_8",                            // or whatever keybinding you wish
  "command": "extension.multiCommand.execute",
  "args": {
    "sequence": [
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  },
  "when": "editorTextFocus"  // if you want this, you probably do
}

If you have more complicated macros you can still build them in your settings.json if you wish.

Update: released for vscode v1.77, more at run multiple commands like a macro.

You are able to do this:

{
  "command": "runCommands",
  "key": "alt+r",    // whatever keybinding
  "args": {
    "commands": [
                              // commands to run in sequence
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  }
}

The command runCommands is built-in, so no extension is necessary for your use case. But see the link above, some use cases might require a macro extension.


Previous answer:

You would need a macro extension to run multiple commands from one keybinding.

I now use multi-command and there are other macro extensions now.

You can use this keybinding (in your keybindings.json) with the multi-command extension - no need for anything in settings.json:

{
  "key": "oem_8",                            // or whatever keybinding you wish
  "command": "extension.multiCommand.execute",
  "args": {
    "sequence": [
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  },
  "when": "editorTextFocus"  // if you want this, you probably do
}

If you have more complicated macros you can still build them in your settings.json if you wish.

Update: released for vscode v1.77, more at run multiple commands like a macro.

You are able to do this:

{
  "command": "runCommands",
  "key": "alt+r", // whatever keybinding
  "args": {
    "commands": [
      // commands to run in sequence
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  }
}

The command runCommands is built-in, so no extension is necessary for your use case. But see the link above, some use cases might require a macro extension.


Previous answer:

You would need a macro extension to run multiple commands from one keybinding.

I now use multi-command and there are other macro extensions now.

You can use this keybinding (in your keybindings.json) with the multi-command extension - no need for anything in settings.json:

{
  "key": "oem_8", // or whatever keybinding you wish
  "command": "extension.multiCommand.execute",
  "args": {
    "sequence": [
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  },
  "when": "editorTextFocus" // if you want this, you probably do
}

If you have more complicated macros you can still build them in your settings.json if you wish.

added 13 characters in body
Source Link
Mark
  • 168.7k
  • 26
  • 491
  • 503

Update: released for vscode v1.77, more at run multiple commands like a macro.

You are able to do this:

{
  "command": "runCommands",
  "key": "alt+r",    // whatever keybinding
  "args": {
    "commands": [
                              // commands to run in sequence
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  }
}

ThatThe command runCommands is built-in, so no extension is necessary for your use case. But see the link above, some use cases might require a macro extension.


Previous answer:

You would need a macro extension to run multiple commands from one keybinding.

I now use multi-command and there are other macro extensions now.

You can use this keybinding (in your keybindings.json) with the multi-command extension - no need for anything in settings.json:

{
  "key": "oem_8",                            // or whatever keybinding you wish
  "command": "extension.multiCommand.execute",
  "args": {
    "sequence": [
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  },
  "when": "editorTextFocus"  // if you want this, you probably do
}

If you have more complicated macros you can still build them in your settings.json if you wish.

Update: released for vscode v1.77, more at run multiple commands like a macro.

You are able to do this:

{
  "command": "runCommands",
  "key": "alt+r",    // whatever keybinding
  "args": {
    "commands": [
                              // commands to run in sequence
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  }
}

That command is built-in, so no extension is necessary for your use case. But see the link above, some use cases might require a macro extension.


Previous answer:

You would need a macro extension to run multiple commands from one keybinding.

I now use multi-command and there are other macro extensions now.

You can use this keybinding (in your keybindings.json) with the multi-command extension - no need for anything in settings.json:

{
  "key": "oem_8",                            // or whatever keybinding you wish
  "command": "extension.multiCommand.execute",
  "args": {
    "sequence": [
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  },
  "when": "editorTextFocus"  // if you want this, you probably do
}

If you have more complicated macros you can still build them in your settings.json if you wish.

Update: released for vscode v1.77, more at run multiple commands like a macro.

You are able to do this:

{
  "command": "runCommands",
  "key": "alt+r",    // whatever keybinding
  "args": {
    "commands": [
                              // commands to run in sequence
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  }
}

The command runCommands is built-in, so no extension is necessary for your use case. But see the link above, some use cases might require a macro extension.


Previous answer:

You would need a macro extension to run multiple commands from one keybinding.

I now use multi-command and there are other macro extensions now.

You can use this keybinding (in your keybindings.json) with the multi-command extension - no need for anything in settings.json:

{
  "key": "oem_8",                            // or whatever keybinding you wish
  "command": "extension.multiCommand.execute",
  "args": {
    "sequence": [
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  },
  "when": "editorTextFocus"  // if you want this, you probably do
}

If you have more complicated macros you can still build them in your settings.json if you wish.

deleted 64 characters in body
Source Link
Mark
  • 168.7k
  • 26
  • 491
  • 503

Update: possibly to be released for vscode v1.77 (it is in the Insiders Build v1.77 now), more at run multiple commands like a macro.

You will soon beare able to do this:

{
  "command": "runCommands",
  "key": "alt+r",    // whatever keybinding
  "args": {
    "commands": [
                              // commands to run in sequence
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  }
}

That command is built-in, so no extension is necessary for your use case. But see the link above, some use cases might require a macro extension.


Previous answer:

You would need a macro extension to run multiple commands from one keybinding.

I now use multi-command and there are other macro extensions now.

You can use this keybinding (in your keybindings.json) with the multi-command extension - no need for anything in settings.json:

{
  "key": "oem_8",                            // or whatever keybinding you wish
  "command": "extension.multiCommand.execute",
  "args": {
    "sequence": [
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  },
  "when": "editorTextFocus"  // if you want this, you probably do
}

If you have more complicated macros you can still build them in your settings.json if you wish.

Update: possibly to be released for vscode v1.77 (it is in the Insiders Build v1.77 now), more at run multiple commands like a macro.

You will soon be able to do this:

{
  "command": "runCommands",
  "key": "alt+r",    // whatever keybinding
  "args": {
    "commands": [
                              // commands to run in sequence
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  }
}

That command is built-in, so no extension is necessary for your use case. But see the link above, some use cases might require a macro extension.


Previous answer:

You would need a macro extension to run multiple commands from one keybinding.

I now use multi-command and there are other macro extensions now.

You can use this keybinding (in your keybindings.json) with the multi-command extension - no need for anything in settings.json:

{
  "key": "oem_8",                            // or whatever keybinding you wish
  "command": "extension.multiCommand.execute",
  "args": {
    "sequence": [
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  },
  "when": "editorTextFocus"  // if you want this, you probably do
}

If you have more complicated macros you can still build them in your settings.json if you wish.

Update: released for vscode v1.77, more at run multiple commands like a macro.

You are able to do this:

{
  "command": "runCommands",
  "key": "alt+r",    // whatever keybinding
  "args": {
    "commands": [
                              // commands to run in sequence
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  }
}

That command is built-in, so no extension is necessary for your use case. But see the link above, some use cases might require a macro extension.


Previous answer:

You would need a macro extension to run multiple commands from one keybinding.

I now use multi-command and there are other macro extensions now.

You can use this keybinding (in your keybindings.json) with the multi-command extension - no need for anything in settings.json:

{
  "key": "oem_8",                            // or whatever keybinding you wish
  "command": "extension.multiCommand.execute",
  "args": {
    "sequence": [
      "workbench.action.files.save",
      "workbench.action.terminal.focus"
    ]
  },
  "when": "editorTextFocus"  // if you want this, you probably do
}

If you have more complicated macros you can still build them in your settings.json if you wish.

added 702 characters in body
Source Link
Mark
  • 168.7k
  • 26
  • 491
  • 503
Loading
Add syntax highlighting.
Source Link
wjandrea
  • 31.6k
  • 9
  • 67
  • 88
Loading
added 58 characters in body
Source Link
Mark
  • 168.7k
  • 26
  • 491
  • 503
Loading
added 248 characters in body
Source Link
Mark
  • 168.7k
  • 26
  • 491
  • 503
Loading
Source Link
Mark
  • 168.7k
  • 26
  • 491
  • 503
Loading