vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Add support for opening multiple project folders in same window

Open stoffeastrom opened this issue 11 years ago • 380 comments

Right now it doesn't seem possible to opening multiple project folders in the same window which imho is a bit constraining. If you are working on modular modern projects it's a must have to be productive.

stoffeastrom avatar Nov 21 '15 06:11 stoffeastrom

agree, but maybe it is a optimize solution for memory

i5ting avatar Nov 21 '15 07:11 i5ting

+1

yoorek avatar Nov 21 '15 09:11 yoorek

I'm not sure I understand the ask; its a lightweight code editor, not an IDE ... why would you need to open multiple "project" folders that aren't hierarchical (where you could set the working path to a mutual parent)?

If you're working on modules that are disparately stored on disk that are somehow interacting with each other to that degree, then they are too tightly coupled to begin with... are your projects siblings? If so, just open the parent folder, or parent / parent folder... wherever the root of your "solution" is.

dmccaffery avatar Nov 22 '15 05:11 dmccaffery

Well, if you have a number of modules (which are all in their own git repository) that is independent of each other but you have one repository that uses those dependencies it makes sense to be able to open these independent folders and make changes that would be reflected so you can test it locally. That would still be a lightweight code editor but a more useful one imho!

stoffeastrom avatar Nov 22 '15 06:11 stoffeastrom

The main issue with setting the project as the parent is that git integration goes away, there are other valid use cases beyond both having a mutual parent as well though.

Tyriar avatar Nov 22 '15 06:11 Tyriar

@stoffeastrom sounds like a use case for submodules; I'm not sure how your project would reference another, unless you were aliasing with some mechanism, such as npm linking, etc. This problem is what package managers are largely intended to solve. If the modules are tightly coupled, then they really aren't isolated modules. You wouldn't be able to reliably make changes to support one project without worrying about the change having consequences for other consumers down the road. Even with submodules, they are read-only by default for exactly that reason.

At any rate, what @Tyriar just mentioned is one of the reasons I am wary of having this type of multi-working path interface in a single instance/window: you have to handle integrations (like git), extensions, refactoring, debugging, etc, etc, etc. all in some isolated fashion. For instance:

If I use the git integration to commit, am I committing project A or project B? If I refactor a class name in TypeScript, should it refactor in project A or project B, or both? What if the same class name exists in both projects with different meanings? What if one is loosely referencing the other?

These are just some examples of how something seemingly simple can get very complicated, very quickly. I think it would be way more confusing and, frankly, less useful than to alt-tab/cmd+tab between a few separate instances of VSCode, each happily managing their own isolated working path without all the extra effort and edge case issues.

Im not saying that it couldn't be solved, but I don't quite understand why switching between multiple windows and/or instances is an issue. Maybe I am missing something...

dmccaffery avatar Nov 22 '15 06:11 dmccaffery

Sublime, Atom, Webstorm - they are also "lightweight" code editors (except maybe Webstorm) and they allow opening multiple root folders from different locations. These editors are probably 99% of what web developers use. Code can compete with them with much better Typescript support (and it will be very popular consider Angular 2 is comming) but only if it will give developers what they use now as a basic functionality.

yoorek avatar Nov 22 '15 08:11 yoorek

+1

daniel-uzunu avatar Nov 22 '15 22:11 daniel-uzunu

+1

nilzona avatar Dec 02 '15 10:12 nilzona

As a Go developer, I find this feature extremely useful in Sublime or IntelliJ Idea. For instance, my small project imports code from Go core library or may import some 3rd party library. So I need to be able to quickly navigate to them and read that code.

elgris avatar Jan 03 '16 06:01 elgris

+1. Multi-git repo microservice solutions are very painful in VS Code right now, thinking of finding another Typescript-capable IDE instead.

rezonant avatar Feb 28 '16 20:02 rezonant

We definitely need some sort of 'solution'. I'm a native dev, and this almost always involves building a set of libs/dll's and then referring to them from some host app project. Once we have multiple projects, we also need a 'startup project' for when we press 'run'.

TurkeyMan avatar Mar 08 '16 15:03 TurkeyMan

I would also like support for projects and multiple git roots. The code I frequently use is found in several git repos and being unable to switch between them without closing my current workspace and opening another just to turn around and close that one to open the previous is exhausting. If I add the parent folder where all my repos are housed then I gain the ability to navigate and search among my files but I lose git integration. It's a real bummer.

The line between "text editor" and "IDE" is pretty dang blurry and I don't really care what VS Code is labeled as. What I do care about is what a tool can do and how painless it is to use. I think adding project support would alleviate a lot of friction for folks like me.

Loren-Johnson avatar Apr 21 '16 16:04 Loren-Johnson

I also would like to see the git integration work when your workspace contains multiple repos, but I just want to make sure folks like @Loren-Johnson realize they can have multiple vs code windows open simultaneously.

This is in response to: "unable to switch between them without closing my current workspace"

rhbecker avatar Apr 21 '16 18:04 rhbecker

You mean #2686 is a duplicate of this?

stoffeastrom avatar Apr 27 '16 19:04 stoffeastrom

Sorry, I misread the description and reopened this one.

bpasero avatar Apr 27 '16 19:04 bpasero

+1

Sapunov avatar May 19 '16 08:05 Sapunov

Is there any progress on this issue, or at least some statement if this will ever be implemented? Are there some low-level decisions in the code that prevent multiple roots in one project?

This is pretty much the only reason I'm not moving from ST3 to VSCode.

lepinkainen avatar May 31 '16 07:05 lepinkainen

+1

jolav avatar Jun 28 '16 15:06 jolav

+1

josebalius avatar Jun 29 '16 03:06 josebalius