'How can we save all files in (VSCode) like we do in Visual Studio

How can we save all the files in Visual Studio Code like we do in Visual Studio by pressing Ctrl+Shift+S ?



Solution 1:[1]

?+?+S // macOS

Ctrl+K S // Windows

Ctrl+Alt+S // Linux

Solution 2:[2]

TL;DR; You can press Ctrl + K , S to save all open files with a little caveat associated with it.

Details: Please be careful about keyboard shortcut combination shown in any menu description. There is a little caveat about it. The combination Ctrl + K S shown as menu description text gives an impression that we have to press Ctrl key, keep the Ctrl key pressed and then press the keys K and S one by one in quick succession. This is not the case.

enter image description here

After having pressed Ctrl + K combination, you need to release both Ctrl and K keys and then press S key separately.

For cases where Ctrl key has to be kept pressed continuously, you'll notice that modifier keys will appear twice in the menu description text. For example, to open a new folder, the menu item's text shows Ctrl + K Ctrl + O. In this case Ctrl modifier key is present twice as shown in the screenshot below:

enter image description here

Solution 3:[3]

For windows user - Visual Studio Code has Ctrl + K , S

  1. Press Ctrl + K.
  2. Release the Ctrl and K both keys.
  3. Press S key.

This will Save all modified files in one go. Release is the main point as new user press S key with Ctrl key which opens key board shortcuts file.

Solution 4:[4]

For Windows users, the key shortcut is displayed as the 11th option in the "File" menu as:

Save All           Ctrl + K S

The key shortcut displayed equates to the following:

  1. Press Ctrl + k

  2. Release the Ctrl and k keys.

    Notice the bottom of your window will display a message asking for a second key like this:

VSCode bottom status message after pressing <kbd>Ctrl</kbd> + <kbd>k</kbd>.

  1. Press s.

This applies to other "Close Workspace" command that can be found in the "File" menu (instead of pressing s, you press f).

Solution 5:[5]

This keybindings.json switches the Save All and Save shortcuts so that Cmd+S is bound to Save All:

[
    {
        "key": "alt+cmd+s",
        "command": "workbench.action.files.save"
    },
    {
        "key": "cmd+s",
        "command": "-workbench.action.files.save"
    },
    {
        "key": "cmd+s",
        "command": "workbench.action.files.saveAll"
    },
    {
        "key": "alt+cmd+s",
        "command": "-workbench.action.files.saveAll"
    }
]

Solution 6:[6]

First of All, I want you to check, What is your VS Code default shortcut for 'Save All' files

Step 1: Open VS Code> 'File' Tab > 'Preferences'> ClickOn 'Keyboard Shortcuts'

Secondly, I want you to search for 'Save All' Shortcut.

Step 2: Type 'Save All' in Search Field

Third, you will see that shortcut keybinding to the 'Save All' Command.

Step 3: You can also change the keybinding to it. Just clicking on it and adding controls of your choice and then press enter.

Solution 7:[7]

I'm a jack of all trades developer, using lots of different tools and operating systems. I'm always nervous about blindly using keystrokes. I much prefer to use a simple "save all" button.

Save All Icon in VSCode

If you add "Open Editors" in your VS Code Explorer window, that selection includes a very handy "Save All" icon. Click the icon, and you are done.

No custom keystrokes required. No preferences to edit.

Solution 8:[8]

As of May 2020 (version 1.46) In Mac the shortcut key is:

Option + Command + s

Solution 9:[9]

To save all the files in VSCode(Windows),

Press Ctrl+K then Press the S.

All files will be saved.

To find other keyboard shortcuts or to change a shortcut,

Go to File -> Preferences -> Keyboard Shortcuts OR Press Ctrl+K+S

Select a keyboard shortcut and press Enter to update/change a keybinding

Solution 10:[10]

ctrl + shift + s

Is supported in latest versions My version is: 1.39.1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 RBT
Solution 2
Solution 3 RBT
Solution 4
Solution 5
Solution 6 Jeremy Caney
Solution 7 zipzit
Solution 8 hasn
Solution 9 AEM
Solution 10 RBT