Sublime Forum

One sublime window to rule them all


i’ve been a licensed user since 2013-01-17. sublime is the single most useful developer tool in my arsenal and i love it. thank you to everyone that has contributed.
the one thing that could make sublime better for me is if there were a way to collapse all windows into one. my working patterns involve keeping multiple project windows open all the time. i work in an area where i contribute to multiple projects simultaneously and context switch from one to another dozens of times a day. often while i am waiting for some longer running bottleneck to complete on one project, i will switch to something else whilst leaving sublime windows open that often contain unsaved work, code and notes. sublime’s ability to recover from a system crash without losing the content of my open windows has hardwired these behaviours into my daily routines for nearly a decade.
the problem is that i often have upwards of a dozen sublime windows open permanently and finding the one i want to work on is cumbersome. if i could hit a magic key combination and collapse all my sublime windows into one, with an easy way to scroll through a list of open projects in order to find the one i need, i would be the sublimest of happy developer bunnies in the world.
please, pretty please can you add this feature for me and all the other context switchers out there.
thank you!

1 Like


At least on MacOS multiple windows can be grouped into one via native tabs.

ST is set to use OS defaults but can ask OS to always do it via "native_tabs": "preferred",



yes. as a fedora user, i’m a little jealous of that one thing you mac people get that we don’t.



An alternative would be to use a quick panel to switch windows via fuzzy search quickly.

Theoretically GotoWindow package is doing that, but its implementation looks rather hacky and dated. Don’t expect it to work anymore as it uses OS APIs to switch windows.

A “Goto: Window” command can however be implemented with native API functions for Sublime Text 4.

Here’s a first shot.


	{ "caption": "Goto: Window", "command": "goto_window"},


	{ "keys": ["ctrl+k", "ctrl+tab"], "command": "show_overlay", "args": {"overlay": "command_palette", "command": "goto_window"} },


import os

import sublime
import sublime_plugin

class WindowInputHandler(sublime_plugin.ListInputHandler):

    def name(self):
        return "window_id"

    def placeholder(self):
        return "Chosse a window"

    def list_items(self):
        items = []

        kind_project = [sublime.KIND_ID_NAMESPACE, "🗔", "Project"]
        kind_file = [sublime.KIND_ID_NAVIGATION, "🗔", "File"]

        for window in
            active_file_name = "untitled"
            view = window.active_view()
            if view:
                file_name = view.file_name()
                if file_name:
                    active_file_name = os.path.basename(file_name)
                    active_file_name =

            project_file_name = window.project_file_name()
            if project_file_name:
                title = f"Project: {os.path.splitext(os.path.basename(project_file_name))[0]}"
                kind = kind_project
                details = [
                    f"Active File: {active_file_name}"
                title = f"File: {active_file_name}"
                kind = kind_file
                details = [
                    f"Project: none"

                    annotation=f"Window {}",

        return items

class GotoWindowCommand(sublime_plugin.ApplicationCommand):

    def input_description(self):
        return "Goto Window"

    def input(self, args):
        if args.get("window_id") is None:
            return WindowInputHandler()
        return None

    def run(self, window_id=None):
        for window in
            if == window_id:


Can’t you just use projects and swap between them? This keeps separate workspaces so they open up just as you left them - including open or edited files.



I’m using tint2 on my Ubuntu with Gnome3 on Xorg though there should be something similar for Wayland too. It’s basically a strip at the bottom of the screen similar to the one found in Windows XP, yes I know, plus the fact that you can re-order the window position by dragging them. Then I am arranging my sublime windows to be delimited by other app windows that I use in that workspace:

This one for example contains just 4 sublime windows because it’s during the holidays …, but on my monitor resolution 1920p I can lay down up to 10 sublime windows with their app separators without issues. Also, note that in Sublime 4 we got that long awaited feature of listing the project name first, before the path (before that I was using a cronjob). Anything beyond 10 sublime windows in a single workspace isn’t really working for me, so I switch to another one. There is an option in Gnome 3 to group your open windows by the workspace they are currently in, meaning ctrl+tab is going to correctly switch only between windows inside the current workspace instead of jumping between workspaces.



I guess the point is just to be able to quickly switch between different open windows (maybe or maybe not representing a project each), rather than closing and opening workspaces - which “Quick Switch Project” or ProjectManager would already fulfill.

I sometimes have folders or single files open in a separate window without managing a project/workspace for them. There’s no way to switch to them quickly other than using OS functionality, which is not always the most efficient solution.



Thanks deathaxe.
I don’t work the same way as grenade but have found different projects useful for context switching within one workspace instance rather than bouncing between different Sublime versions. I can call each project something meaningful to help aid me even if I’ve not used the project for a while.
I found that the project files are easy to edit within sublime to then craft the one you want from something similar, meaning that you don’t need to make a new project from scratch each time.
Of course, each to his own - it was a question and suggestion.
Cheers, Cornishman

1 Like


A more mature version of “Switch Window” is available via Package Control.