I have the following keybinding in VS code which toggles the position of the cursor between the active document and built-in terminal:
// Toggle between termin
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.