alefragnani / vscode-project-manager

Project Manager Extension for Visual Studio Code
GNU General Public License v3.0
1.94k stars 224 forks source link

Support multiple folders in the same project #46

Closed alefragnani closed 7 years ago

alefragnani commented 8 years ago

Depends on:

alefragnani commented 8 years ago

Depends on:

bryaan commented 7 years ago

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

Anthropic commented 7 years ago

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

alefragnani commented 7 years ago

Sure it could :smile:. 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 :+1:

alefragnani commented 7 years ago

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 commented 6 years ago

@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 commented 6 years ago

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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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 commented 4 years ago

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!