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

Support multiple folders in the same project #46

Closed
2 tasks done
alefragnani opened this issue Sep 3, 2016 · 11 comments
Closed
2 tasks done

Support multiple folders in the same project #46

alefragnani opened this issue Sep 3, 2016 · 11 comments
Assignees
Labels
depends on Depends on issues from VS Code enhancement
Milestone

Comments

@alefragnani
Copy link
Owner

alefragnani commented Sep 3, 2016

Depends on:

@alefragnani
Copy link
Owner Author

alefragnani commented Oct 26, 2016

@bryaan
Copy link

bryaan commented Mar 7, 2017

Can we have it mock with symlinks for now? Could do it by hand, but I think it makes sense for this project.

@alefragnani alefragnani added this to the Multifolder milestone Mar 19, 2017
@Anthropic
Copy link

@alefragnani is there any way you could open new windows for each folder defined in paths?

@alefragnani
Copy link
Owner Author

Sure it could πŸ˜„. But that is not the intention for this issue. I filled just to remember myself to update (if necessary) when VSCode itself support multi folder projects.

But I get your idea . It's interesting πŸ‘

@alefragnani
Copy link
Owner Author

The multi-folder is coming to VSCode (is already in the current Insiders), and it uses a peculiar approach, putting the multi-folder info inside settings.json. Doing so, there is nothing to be done (adapted) in the extension, which is good πŸ˜„ .

@gjuchault
Copy link

gjuchault commented Jun 18, 2018

@alefragnani Can you explain how we can add multiple directories ?

Current use case (not working):

  1. Open a folder
  2. Right click on sidebar, Β« Add Folder to Workspace... Β»
  3. Save the project

What you get:
image

What my .code-workspace looks like:

{
	"folders": [
		{
			"path": "arena.utt.fr-api"
		},
		{
			"path": "arena.utt.fr-2018"
		}
	],
	"settings": {}
}

Also tried (by going into projects.json):

[
	{
		"name": "arena",
		"rootPath": "$home/Workspace",
		"paths": [
			"arena.utt.fr-api",
			"arena.utt.fr-2018"
		],
		"group": ""
	}
]

And it doesn't works, it just opens my whole Workspace directory.

Any clue ?

@alefragnani
Copy link
Owner Author

Hi @gjuchault ,

This option was put on hold after Workspaces has landed in VS Code. That's why it has no effect today, and will probably be removed in the future. The original intention was to prepare for Workspaces (even before being developed by VS Code itself) but with the current Workspaces implementation (which hides access the .code-workspace) access, I didn't see a good reason to keep it.

Looking at it now, after your comment, I was thinking that maybe it could be used to mimic a workspace. I mean, I could create my own workspace API, as originally intended. I will think about it πŸ˜€ .

Hope this helps

@dufferzafar
Copy link

@alefragnani So Is there no way to have multiple folders in a single project?

I'm very new to VSCode and coming from Sublime, this is one of the features I'm missing.

In Sublime, this option is called "Add folder to project" which adds any folder to the current project.

@dufferzafar
Copy link

I finally read up on what workspaces are, and I think they're just like sublime's projects.

I bound Alt+Ctrl+P to workbench.action.openRecent which is what Sublime has.

I've disabled this plugin for now, if I miss a feature from Sublime, I'll come back.

@alefragnani
Copy link
Owner Author

Hi @dufferzafar ,

Yes, Workspaces in VS Code are the answer to Multifolder Projects in Sublime. You can create a workspace containing a set of folders, and when you open that workspace, it will present you all that folders opened at once, in the same window.

My extension was created at the very beginning of VS Code. The idea was to have a Manager for your Favorite Projects, with an easy way to manage and open them. Today, it allows you to have not only your Favorite Projects but also an auto-detection of Git, SVN and Mercurial repositories. So, you just have to define a baseFolder where these repositories are, and you a ready to use them. There is no relation to Sublime's projects or VS Code workspaces.

I've disabled this plugin for now, if I miss a feature from Sublime, I'll come back.

No problem πŸ‘

@zhyiyu
Copy link

zhyiyu commented Jan 15, 2020

We can add multiple folders to a workspace now, but it seems like there is no way of opening a new workspace without closing out the old one. Also, there is no way of saving the old workspace, or even change its name!

And that is why I ask for help from project manager, is there a way of doing that?

Please forgive me for asking this dumb question here, but I have been trying to find instructions for a few days with no one seems to be interesting doing this.

Please let me know if my description was not clear. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends on Depends on issues from VS Code enhancement
Projects
None yet
Development

No branches or pull requests

6 participants