Close all tabs, but not the window, in Sublime Text
Here is what I have set up on Mac Sublime Text 3
1. Go to Sublime Text -> Preferences -> Key Bindings - User 2. Add the following binding: [ ... ... ... { "keys": ["command+shift+w"], "command": "close_all" } ] 3. Save file
Now, hitting "Command+Shift+W" will close all of your open tabs. Hitting "Command+W" closes current tab only. This is sort of consistent with Mac shortcuts for other app windows.
Thanks to Alex, it turned out kind of simple, Preferences > Key Bindings > User:
{ "keys": ["super+shift+w"], "command": "close_all" }
No need to restart Sublime, it works right away. And what's even better, no need to get used new shortcuts, you can still close Sublime window with Cmd-W
after all tabs are gone.
There's an option in the file menu, but it has no shortcut:
- File -> Close All Files
Edit - change user settings:
kay, open Preferences -> Key Bindings - User and paste the following between the []:
{ "keys": ["ctrl+alt+shift+w"], "command": "close_all" }
then use Ctrl, Alt, Shift and w to close all tabs.
You'll have to restart Sublime first.
Note: For Sublime Text 3.2.2,Build 3211 you don't need to restart the sublime text to waste your time.Just place code in [ ](as mentioned above),save it and close Key Bindings - User window.Now all opened tabs will be close with out exiting Sublime Text by using Ctrl + Alt + Shift + W .