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

Add support for opening multiple project folders in same window #396

Closed
stoffeastrom opened this issue Nov 21, 2015 · 380 comments
Closed

Add support for opening multiple project folders in same window #396

stoffeastrom opened this issue Nov 21, 2015 · 380 comments
Labels
feature-request Request for new features or functionality workbench-multiroot Multi-root (multiple folders) issues
Milestone

Comments

@stoffeastrom
Copy link

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.

@i5ting
Copy link

i5ting commented Nov 21, 2015

agree, but maybe it is a optimize solution for memory

@yoorek
Copy link

yoorek commented Nov 21, 2015

+1

@chrisdias chrisdias added the feature-request Request for new features or functionality label Nov 21, 2015
@dmccaffery
Copy link

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.

@stoffeastrom
Copy link
Author

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!

@Tyriar
Copy link
Member

Tyriar commented Nov 22, 2015

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.

@dmccaffery
Copy link

@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...

@yoorek
Copy link

yoorek commented Nov 22, 2015

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.

@daniel-uzunu
Copy link

+1

1 similar comment
@nilzona
Copy link

nilzona commented Dec 2, 2015

+1

@egamma egamma modified the milestone: Backlog Dec 10, 2015
@elgris
Copy link

elgris commented Jan 3, 2016

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.

@rezonant
Copy link

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

@TurkeyMan
Copy link

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'.

@bpasero bpasero changed the title feature request: add support for opening multiple project folders Add support for opening multiple project folders Mar 14, 2016
@bpasero bpasero self-assigned this Mar 30, 2016
@Loren-Johnson
Copy link

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.

@rhbecker
Copy link

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"

@bpasero bpasero closed this as completed Apr 27, 2016
@bpasero bpasero reopened this Apr 27, 2016
@stoffeastrom
Copy link
Author

You mean #2686 is a duplicate of this?

@bpasero
Copy link
Member

bpasero commented Apr 27, 2016

Sorry, I misread the description and reopened this one.

@Sapunov
Copy link

Sapunov commented May 19, 2016

+1

@lepinkainen
Copy link

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.

@joaomoreno
Copy link
Member

After this contextual explanation, my question is simple - would this feature support projects who's .git folder is an ancestor of their root? If so, then it would be possible to use this feature in a mono-repo.

This is already supported since quite a long time, if you simply open a subfolder of a git repo.

@inestyne
Copy link

+1

Sublime and Atom do it you should to. No better reason. This is the NEW MS, get it done guys, i have complete faith in you. :)

@pr-yemibedu
Copy link
Contributor

Hello,
@inestyne if you please read prior posts like from @Jeyanthinath you would be aware of using VSCode Insiders to evaluate this feature already. There is even a roadmap to check. So please use the product and provide feedback before it migrates to stable so we all get the best product possible. Thank you. Good day.

@nahuelhds
Copy link

Just read the thread and use Insiders OMG. I'm gonna unsubscribe... you trolls that doesn't read are impossible. Thanks @pr-yemibedu

@inestyne
Copy link

Sensitive

@bitblitz
Copy link

bitblitz commented Oct 6, 2017

Since this thread is 2 years long, and the feature seems to be in the Insiders' build now, is there a way to mark this thread so that is more obvious than reading the entire thread from the top?

@jearle
Copy link

jearle commented Oct 20, 2017

One thing that is missing is the ability to open up a new window with a new workspace from the CLI.

@Tyriar
Copy link
Member

Tyriar commented Oct 20, 2017

@jearle A new window/workspace should be created as before with code-insiders <folder>, no?
code-insiders -a <folder> is needed to add the folder to the current window.

@jhonnymoreira
Copy link

@Jeyanthinath thanks! Been doing the same thing as @JamesTheHacker and it will help me!

@jearle
Copy link

jearle commented Oct 23, 2017

@Tyriar to get the functionality I wanted I have to execute the following commands:

code .; code -a .

code . opens the folder as a non workspace, and then the code -a . attaches it's self to the previously open window as a workspace allowing me to open the same folder more than once.

@dark-swordsman
Copy link

I personally think this also needs to be changed. I am working with ionic and a custom server in two different git repos and it's not very easy. The ability to at least have two separate "project tabs" open or something would be great.

I switched from Atom because of how buggy and slow it was.

@felixfbecker
Copy link
Contributor

@dark-swordsman you can enable nativeTabs on mac

@dark-swordsman
Copy link

dark-swordsman commented Oct 30, 2017

@felixfbecker is this possible on Windows?

Edit: I searched through the settings file completely and there is no option for that. That's why I'm asking.

Edit2: Also, there isn't a clear resource on how to enable vs insiders

@pr-yemibedu
Copy link
Contributor

Hello,
@dark-swordsman you do not enable VS Insiders. It is a build of VSCode that has some extra features that have not finalized to stable and in a way gives you an extra editor namespace to work with (You can install them side by side without conflicts of settings or extensions). Thank you. Good day.

@bpasero
Copy link
Member

bpasero commented Nov 2, 2017

Support for multi-root workspaces is now enabled by default in the stable release.

panel-red2

Please refer to our documentation for a full explanation of all the features that come with it. Extension authors should refer to our wiki that explains the new extension APIs to make your extension ready for multi-root workspaces. We are happy that quite some extensions have already started to adopt the new multi-root API, thanks for that!

Please do not hesitate to file issues for multi-root as you encounter them, we are still planning on making tweaks and providing additional APIs for extensions to work with multi-root workspaces in the future.

@dark-swordsman
Copy link

dark-swordsman commented Nov 2, 2017

This is great, but when will it be available? You say it's in the stable build, but I have the latest Stable build (1.17.2) and can't update to it. Also, in the documentation that you just referenced, it said it's still in the Insider's build and will be in the stable release soon.

I understand it may be a small while before the next build is released, but I saw this notification expecting it to be available. Sorry if I'm being impatient, I am just getting to a point in my current project where this is extremely necessary and is partially responsible for preventing me to continue.

Edit: I apologize for my impatience. I was just trying to open a new window the manual way (call the .exe again) and it wasn't working, but didn't look in File > Open New Window. This will work for now. Looking forward to the release of the next build. 👍

@karuppasamy
Copy link

@bpasero Please close this #35849 open issue since the expected functionality has done as part this #396 feature.

@DJManas
Copy link

DJManas commented Nov 11, 2017

Just a quick question. Is it possible, when I have opened more folders, to switch which folder I want to compile? At the moment it is always the first one in stable version.

EDIT: This might be for the creator of PlatformIO extension, but I am asking on both sides. Just in case...

@bpasero
Copy link
Member

bpasero commented Nov 13, 2017

@DJManas it sounds like that this is up to the extension you are using to decide, so you should ask the author of the extension.

@DJManas
Copy link

DJManas commented Nov 13, 2017

@bpasero Ok, I did in parallel, thank you for reply.

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality workbench-multiroot Multi-root (multiple folders) issues
Projects
None yet
Development

No branches or pull requests