Sublime Forum

Shortcut for save all?

#1

i cant find this anywhere? does anyone know how to save all?

1 Like

#2

Add this into your keymap file:

{ "keys": "ctrl+alt+shift+s"], "command": "save_all" }

(or whatever shortcut you would like)

0 Likes

#3

command-alt-s works for me, and I didn’t add it.

0 Likes

#4

[quote=“iamntz”]Add this into your keymap file:

{ "keys": "ctrl+alt+shift+s"], "command": "save_all" }

(or whatever shortcut you would like)[/quote]

Awesome thanks!

0 Likes

#5

You’re missing an open bracket, it should be:

{ "keys": ["ctrl+alt+shift+s"], "command": "save_all" }
0 Likes

#6

CTRL+ALT+S is vacant so this might be handier:

{ “keys”: [“ctrl+alt+s”], “command”: “save_all” }

0 Likes

#7

Why’s there ] there?

0 Likes

#8

@prezine

Because that is the format adopted by Sublime Text for this (and many other) type of configurations.
Where a shortcut requires a combination of 2 or more keys, they are square bracketted after being joined by a plus character and then enclosed in quotes.

e.g. Shortcut for using CTRL-X for cutting selected text would have a config JSON entry like:

{ “keys”: [“ctrl+X”],
“command”: “cut” }

0 Likes

#9

Actually, you will need to follow the full syntax including “args”: { “async”: true } },

Preferences > Key Bindings > then in the pane on the right add:

{ “keys”: [“ctrl+wathever+your+shortcut”], “command”: “save_all”, “args”: { “async”: true } },

0 Likes

#10

That does not seem to work (anymore?) as of oct 2021

1 Like

#11

@thebigbamboo

Yes, spotted this lately.

The effect of ctrl+alt+s is just to shrink the viewport window. So there must be an underlying binding for this key shortcut, although it is not listed in Preferences > Key Bindings

So I edited the old keybinding entry to become:

{ “keys”: [“ctrl+alt+a”], “command”: “save_all”, “args”: { “async”: true } }

and it’s working again, albeit with a few seconds to execute all the edited files of the project.

1 Like