Iād love it if I could switch branches in a project and have it act like switching a project in Sublime. Meaning, Iād like to have a modal dropdown to choose which branch Iām switching to and when switching, have it change which files are open to whatever the last state was when I was in that branch. How much work would something like this be?
Git change branch like project switching
I think itās more likely that a plugin does this, rather than ST core. Though it would be done with the quick panel rather than a modal dropdown.
Just found myself wanting this, nice to see thereās interest in it. Couldnāt find anything which does it, so I might create a plugin over the summer if I find the time.
I use Git from the command line though, so I was thinking that the Sublime plugin would just monitor the current branch and silently update which files are open when the branch changes, rather than using a Sublime command to trigger branch changes. I guess both could be supported, with the option to switch between the two as a preference.
Youād want to preserve as much state as possible ā preserving open files is essential, but scroll position in each file would be nice as well. Never looked at the Sublime API so Iām not sure how difficult that would be.
There are already many plugins for Git support.
I think the easiest way would be to fork one of them and implement the missing āsave workspaceā feature.
im currently workin on that kind of plugin, i think i finish it in month or so.
There are missing feature in sublime api - save workspace and change workspace (but functionality in sublime text is ready).
if i could use this things through API i would finish that plugin in a day or two, but i needed to implement this myself.
Did you ever find those APIās I"m really interested in having easy switching of workspaces.
Did you get anywhere with this?
Is there an api to āSave Workspace Asā¦ā?
Is there an api to āQuick Switch Workspaceā?
Is there an api to list available Workspaces?
Is there an api to delete a .sublime-workspace file?