As I understand, VS Code supposed workflow is opening entire project folder. Not that it's said explicitly somewhere at the start of documentation as things like this should be...
But I prefer to open just the files that I need often, so that I can see them all at the same time, not as tree structure but just as plain list of files.
Now, I actually have two projects that I work on and I'd very much like to keep them in two separate windows. Good thing that VS Code support several windows and have a "window.restoreWindows": "all" setting...
But when I test it - open a window, populate it with some files, open second window, populate it with other files, close second window, close first window, reopen VS Code - sure enough, only the first window is restored. And there is no way to explicitly save window state (session) to a file...
How that setting is supposed to work? Windows could be closed only one by one, so it seems that every window state except last one will be lost. Is it useful only in case of crash or reboot?
I can just create desktop shortcuts for each project, like "code path-to-project-folder", but then VS Code will open entire project instead of just list of files that I need.
Is there a way to keep my workflow?
Ok, so it turns out that I can open a directory as a project, open files I need and they all be in the sidebar under "Open Editors"; now, if I close a VS Code instance and at any later time reopen the same directory with it, all Open Editors will be perfectly preserved. Cool!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With