<p dir="auto">Currently I think the only way to perform multiple commands in succession is to create an extension. It would be good if this was supported by keybindings.json.</p>
<p dir="auto">See <a href="http://stackoverflow.com/q/37009184/1156119" rel="nofollow">http://stackoverflow.com/q/37009184/1156119</a></p>
<p dir="auto">When creating keyboard shortcuts, it would be nice if you could pass an array of commands (to execute like a macro) that would run the commands in that order.</p>
<p dir="auto">So take this for example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
    &quot;key&quot;: &quot;ctrl+s&quot;,
    &quot;command&quot;: [
        &quot;editor.action.format&quot;,
        &quot;editor.action.trimTrailingWhitespace&quot;,
        &quot;workbench.action.files.save&quot;
    ],
    &quot;when&quot;: &quot;editorTextFocus&quot;
}"><pre class="notranslate"><code class="notranslate">{
    "key": "ctrl+s",
    "command": [
        "editor.action.format",
        "editor.action.trimTrailingWhitespace",
        "workbench.action.files.save"
    ],
    "when": "editorTextFocus"
}
</code></pre></div>
<p dir="auto">It would format the file, remove trailing white space then save the file.</p>