Close all tabs, but not the window, in Sublime Text

firedev picture firedev · Nov 26, 2012 · Viewed 30.9k times · Source

Is there a way to close all tabs in one go in Sublime Text, but leave the window with the current project open? It is really annoying when I just want to close all open file and start the new task I have to Cmd-W them one by one. If I do Cmd-Opt-W it will close all tabs and the current project.

Answer

firedev picture firedev · Nov 26, 2012

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.