Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to save a list of opened editors in a group and switch between them #9498

Open
jdforsythe opened this issue Jul 19, 2016 · 33 comments
Open
Labels
feature-request Request for new features or functionality workbench-editors Managing of editor widgets in workbench window
Milestone

Comments

@jdforsythe
Copy link

  • VSCode Version: 1.3.1
  • OS Version: all

There are many times I have a set of open editors in the middle of working on something but need to stop and look at a completely different part of the project.

Currently, I can:

  1. Just open the new set of files I need, which clutters up the open editors
  2. Close my open editors and open the new set of files, which makes it easier to work on the second part but very difficult to get back to the previous state when I need to

It would be nice to be able to save a state of which editors and files are open to retrieve later so I could save the state, close everything, and switch to the new set of files, then easily restore the initial state when I'm finished.

This is my main use case for wanting to be able to open multiple windows. See #7330 #2686

@kieferrm kieferrm added the feature-request Request for new features or functionality label Jul 20, 2016
@bpasero bpasero changed the title Feature Request - Save and restore open editors state Allow to save a list of opened editors in a group and switch between them Aug 5, 2016
@bpasero
Copy link
Member

bpasero commented Aug 5, 2016

Sounds much like "Working Sets" in Eclipse.

@bpasero bpasero added this to the Backlog milestone Aug 5, 2016
@bpasero bpasero removed their assignment Aug 17, 2016
@epogue
Copy link

epogue commented Jun 3, 2017

@bpasero It's similar. The feature also exists in Nuclide (Facebook's Atom extension) and it is fairly nice for removing noise in monolithic apps when you're focused on just a portion of it (i.e. frontend vs backend).

@georgemarrows
Copy link

This sounds like #13951. Seems there's an experimental extension available.

@bpasero bpasero added workbench-editors Managing of editor widgets in workbench window and removed workbench labels Nov 16, 2017
@bpasero bpasero removed this from the Backlog milestone Nov 17, 2017
@prufrock123
Copy link

prufrock123 commented Jan 24, 2018

@isidorn, @bpasero - Pleeeease consider adding this?

I saw it is closed for consideration for the next 6-12 months. But this feature would be so helpful.

I wanted to comment on this on #13951, but it's been locked by vscodebot.

:( :(

@jcrben
Copy link

jcrben commented Mar 7, 2018

I noticed https://marketplace.visualstudio.com/items?itemName=eamodio.restore-editors which seems to work - haven't tested it much yet. the experimental extension mentioned by @georgemarrows above looks like https://github.com/devtanc/vscode-tab-hero which didn't look like it went very far.

@tzontron
Copy link

.sublime-workspace config represents the equivalent functionality in Sublime - saving opened tabs and their properties tied to a project (vs code workspace).

.sublime-project is what vs code now has with the .code-workspace - a way to open previously saved folders in a workspace. Similar implementation as .sublime-workspace will be great - having 2 config files:

  • one containing opened folders in the workspace (.code-workspace)
  • one for the tabs and their properties for the same workspace (the missing part)

Then by exporting the workspace you get both files generated. Importing them back should have the choice of restoring the workspace as a whole including both tabs and folders or only one of them.

@PiotrKarczmarz
Copy link

I'm building VS Code plugin that will remember your whole "workspace" in VS.

In short, everything is based on the “mental snapshots” concept as cornerstone idea. Mental snapshot include:

– last opened files
– windows position, state and order
– breakpoints
– bookmarks
– debug variables etc.

Every “mental snapshot” could be easily restored from plain JSON file. They are easily diffable and could be added to source control to share with entire team. ContextKeeper idea is about to take developer context to the pedestal next to the source code.

You could check out how the big picture looks like at http://contextkeeper.io

@jcreek
Copy link

jcreek commented Mar 27, 2019

Any progress with this? I've been using Save All The Tabs for Visual Studio and having switched to VS Code I'm really missing this functionality.

@ackvf
Copy link

ackvf commented Sep 18, 2019

I would like to be able to save the current state of workspace (such as layout + open editors) by a branch or issue number I am working on.

Currently, VSCode already saves everything and allows us to continue work after restart, so why could it not be saved and restored on demand by name?

@r01010010
Copy link

r01010010 commented Sep 19, 2019

+1 I need this. I'd like to save also how editors/tabs are opened in different splits.

@bpasero bpasero added this to the Backlog milestone Oct 24, 2019
@sgon00
Copy link

sgon00 commented Dec 21, 2019

I found this extension https://github.com/jsaulou/vscode-tasks-context which can create tasks and associate files relevant to those tasks. The best part is It stores the config file at perProject/.vscode/tasks-context.json with relative path. Thus I no longer need to worry about the change of project name and path.

@llccing
Copy link

llccing commented Dec 25, 2019

i think workspace could resolve this question,create different workspace for every project.

@xmedeko
Copy link
Contributor

xmedeko commented May 7, 2020

One more extension is Tab Groups - similar to Restore Editors, but supports multiple, named, tab groups.

@NirmalManoj
Copy link

I need this, this will be a very useful feature.

@leniel
Copy link

leniel commented Nov 5, 2020

One more comment here to keep it alive! Restore the open files for each task (per git branch) would be awesome. Time saver.

@tukusejssirs
Copy link

This feature keeps me from switching from Sublime Text 3 to VS Code. I have 20+ projects/workspaces in ST3 in which I have open files of several size (some have 32+ MiB) and I want to save some of my resources by not opening of these files in the background.

@bladerunner2020
Copy link

One more extension is Tab Groups - similar to Restore Editors, but supports multiple, named, tab groups.

Thanks that's exactly what I needed! 👍🏻

@nickpapoutsis
Copy link

I, too, want to see a robust implementation since some of us need to open a bunch of different files every time we work on a project so being able to save the editors (and their position, etc) is quite the time-saver.

@Kenobi-the-2nd
Copy link

I agree. This feature would be very useful, reducing clutter and freeing up more screen space by getting rid of tabs unrelated to the project at hand.

@koenzhao
Copy link

I do look forward to this feature too! I just wonder if VSCode support this, and googling it, this issue comes up. Please considering it.

@msftwindowslinux
Copy link
Contributor

msftwindowslinux commented Sep 23, 2021

Apologies if I missed this already being discussed, but one question I had is how does vscode currently "remember" editor group layouts when opening a workspace?

Even if we ignore tabs within editor groups, it seems like all the extensions that try to implement some form of "editor layout saving" can't save the real layout because the window api only provides a list of texteditors, each of which only have an integer viewcolumn as a positional identifier (I'm guessing this is a legacy of the original column-based design before we had horizontal splits).

But this makes it impossible to distinguish between e.g. 3 editor groups split among 2 columns, and the horizontal split being located in either the left or right column. In both cases, looping over vscode.windows.texteditors, the viewColumns will be [1,2,3].

As an aside (and maybe this is a known issue already), if one of those editor groups was just a terminal, it wouldn't even show up in the list of texteditors, and does get lost when vscode reloads, (though it seems like the editor group that should contain the terminal does appear, but then closes before the terminal actually loads).

@reefhound
Copy link

I use an extension called Working Sets.
https://marketplace.visualstudio.com/items?itemName=bernardop.working-sets

It's useful but is stored in AppData and uses full paths so it cannot easily be shared with other devs.

I would like vsCode to simply remember the Open Editors per branch. When I work on a feature branch for routing I have my routing files open. When I work on a feature branch for auth I have my auth files open. Create New Branch could default to current open editors. It's easy to close all open editors if you want to start from scratch.

@moiz-sohail
Copy link

One more extension is Tab Groups - similar to Restore Editors, but supports multiple, named, tab groups.

Thanks

@Vcoder89
Copy link

Keeping this alive, could really use a feature like this, definitely helps with context switching.

@meatnordrink
Copy link

meatnordrink commented Mar 3, 2022

I'd love to see this feature natively, but another extension that works well for this -

https://marketplace.visualstudio.com/items?itemName=suhay.vscode-editor-group-minimizer

@jnilla
Copy link

jnilla commented Jul 4, 2022

This is called task-focused-interface, original idea (afaik) from Mik Kersten, creator of the mylyn project on eclipse ide. Is simply a brilliant idea but poorly promoted the name of the tool in eclipse is 'tasks' which gives you no clue what it is for apart from a todo list. The tools allows you to save 'contexts' (set of opened editors) and switch between them fast so there is less mental friction. Im exited to see this on vscode im even thinking to code this myself if needed

@Ben-CA
Copy link

Ben-CA commented Aug 11, 2022

Would like to see this natively in VS Code as well.

@jnilla
Copy link

jnilla commented Aug 11, 2022

For anyone interested this extension works almost the same as the eclipse mylyn tool
https://marketplace.visualstudio.com/items?itemName=marlom.keep-context

@djwashburn
Copy link

Agree this would be very useful natively. Choosing, adding, and learning a plugin is also a context switch, which I don't have time for atm.

@alexzhaohong
Copy link

See #35307 for a related issue with a slightly different trigger in that it depends on git branch.

I do think a native implementation similar to the eclipse mylyn tasks tool would be sufficient for this ask.

@Smast3r
Copy link

Smast3r commented Dec 12, 2024

If you know about any extension that solves this problem. list it below please

@nullaegy
Copy link

I've found this one, and using it for several months:
https://marketplace.visualstudio.com/items?itemName=ctf0.save-editors-layout
this is the best. :]

@tekert
Copy link

tekert commented Dec 16, 2024

Im the only wanting this but for opened windows?
I usually work on 3 out of 6 rotating proyects (worksets), so i have 6 open windows (thank god they are remembered when reopening vscode), The problem is when the projects rotate because they are done for the moment, and then later you want them back, it's a pain to remember where these project are to reopen, and worse if on the same day you have to switch on 4 projects to another 4 and then back to another 2.
Also, would be great if the icon would change color depending on the project type or some custom setting for that workspace, also more great if it would show an additional bar based on memory usage for that window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality workbench-editors Managing of editor widgets in workbench window
Projects
None yet
Development

No branches or pull requests