3

How can I set a shortcut for File: Save All Files (NOT File: Save All)? It appears in the command palette:

command palette

But not in the keyboard shortcut list:

not in settings

Timmmm
  • 88,195
  • 71
  • 364
  • 509
  • Have you seen [this question](https://stackoverflow.com/questions/37014171/how-can-we-save-all-files-in-vscode-like-we-do-in-visual-studio)? I'm not sure what the difference is between the two commands. – Mihai Chelaru Aug 05 '19 at 16:00
  • 2
    Yes. The difference is that `Save All Files` doesn't attempt to save `Untitled-1` and so on. – Timmmm Aug 05 '19 at 16:19

1 Answers1

6

The internal command name for "Files: Save All Files" is "workbench.action.files.saveFiles". (I had to look in the source code to find it.)

Here is a screenshot of it bound to Ctrl+A, Ctrl+A in the GUI:

Screenshot of key bindings UI with Save All Files bound

In keybindings.json, that is:

    {
        "key": "ctrl+a ctrl+a",
        "command": "workbench.action.files.saveFiles"
    },
Scott McPeak
  • 8,803
  • 2
  • 40
  • 79