vscode-project-manager

alefragnaniGPL-3.0活跃维护

VS Code 扩展,帮你把常用项目集中管理,一键切换、保存和打开工作区,省去反复找文件夹的麻烦。

Project Manager Extension for Visual Studio Code

v12.0.1发布于 2020-11-24 01:51 UTC2,697star +3 / 7 天350fork同步于 2026-11-10 23:44 UTC

怎么上手

由 README 提炼,执行前请确认
在 VS Code 扩展市场搜索并安装 alefragnani.project-manager
硬件要求按 README 说明

README 未说明,作为 VS Code 扩展随编辑器运行

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

VS Code 扩展,集中保存和快速打开散落各处的项目文件夹

VS Code 扩展,帮你把常用项目集中管理,一键切换、保存和打开工作区,省去反复找文件夹的麻烦。

核心能力

  • 保存任意文件夹或工作区为项目收藏
  • 自动检测 Git、Mercurial、SVN 仓库
  • 用标签分类筛选项目列表
  • 支持同窗口或新窗口打开项目
  • 状态栏与侧边栏标识当前项目

容易踩的坑

projects.json 必须保持合法 JSON,格式错误会导致扩展无法读取项目列表;若主要在远程(SSH/WSL)上工作,需在用户设置里配置 remote.extensionKind 才能保存远程项目;路径可用 ~ 或 $home 代替 HOME 目录

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

2 个版本v12.0.1
  1. v12.0.1最新正式版2020-11-24 · 2020-11-24 01:51 UTC

    Added

    • Open Settings command to the Side Bar (issue #434)
    • Concatenates the "Number of Projects" on each Panel in the Side Bar (issue #267)
    • Reveal in Finder/Explorer command in the Side Bar's context menu (issue #322)
    • Setting to decide if auto-detected projects should ignore projects found inside other projects (issue #189)

    Fixed

    • Conflict with non-unique command (issue #441)

    Internal

    • Use vscode-ext-help-and-feedback package (issue #432)
  2. v11.3.02020-09-06 · 2020-09-06 18:50 UTC
    查看更新说明

    Added

    • Support $home and ~ (tilde) symbol on projectLocation setting (issue #384)
    • Support ~ (tilde) symbol on any path related setting (issue #414)
    • Support glob patterns in ignoredFolders settings (issue #278)
    • Localization - Czech (Thanks to @Amereyeu PR #412)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    English | 简体中文

    What's new in Project Manager 13.1

    • Improved Tags support
    • Improved auto-detected projects support
    • Fully Open Source again
    • Adds Profile support
    • Highlights the current project in the Side Bar
    • Published to Open VSX
    • Adds Getting Started / Walkthrough
    • Organize your projects with Tags
    • Adds Virtual Workspaces support
    • Adds Workspace Trust support

    Support

    Project Manager is an extension created for Visual Studio Code. If you find it useful, please consider supporting it.

    Project Manager

    It helps you to easily access your projects, no matter where they are located. Don't miss those important projects anymore.

    You can define your own Projects (also called Favorites), or choose for auto-detect Git, Mercurial or SVN repositories, VSCode folders, or any other folder.

    Here are some of the features that Project Manager provides:

    • Save any folder or workspace as a Project
    • Auto-detect Git, Mercurial or SVN repositories
    • Organize your projects using Tags
    • Open projects in the same or new window
    • Identify deleted/renamed projects
    • A Status Bar which identifies the current project
    • A dedicated Side Bar

    Features

    Available Commands

    • Project Manager: Save Project Save the current folder/workspace as a new project
    • Project Manager: Edit Project Edit your projects manually (projects.json)
    • Project Manager: List Projects to Open List all saved/detected projects and pick one
    • Project Manager: List Projects to Open in New Window List all saved/detected projects and pick one to be opened in New Window
    • Project Manager: Filter Projects by Tag Filter the Favorite projects by selected tags

    Manage your projects

    Save Project

    You can save the current folder/workspace as a Project at any time. You just need to type its name.

    Save

    It suggests a name to you automatically :)

    Edit Projects

    For easier customization of your project list, you can edit the projects.json file, directly inside Code. Just execute Project Manager: Edit Projects and the projects.json file is opened. Simple as this:

    [
        {
            "name": "Pascal MI",
            "rootPath": "c:\\PascalProjects\\pascal-menu-insight",
            "tags": [],
            "enabled": true,
            "profile": "Delphi"
        },
        {
            "name": "Bookmarks",
            "rootPath": "$home\\Documents\\GitHub\\vscode-bookmarks",
            "tags": [
                "Personal",
                "VS Code"
            ],
            "enabled": true,
            "profile": "VSCode"
        },
        {
            "name": "Numbered Bookmarks",
            "rootPath": "~\\Documents\\GitHub\\vscode-numbered-bookmarks",
            "tags": [
                "Personal",
                "VS Code"
            ],
            "enabled": false,
            "profile": "VSCode"
        }
    ]
    

    You can use ~ or $home while defining any path. It will be replaced by your HOME folder.

    Be sure that the JSON file is well-formed. Otherwise, Project Manager will not be able to open it, and an error message like this should appear. In this case, you should use the Open File button to fix it.

    Corrupted

    Access

    List Projects to Open

    Shows your projects and select one to open.

    List Projects to Open in New Window

    Just like List Projects but always opening in New Window.

    Keyboard Focused Users

    If you are a keyboard focused user and uses Vim like keyboard navigation, you can navigate thru the project list with your own keybindings.

    Just use the when clause "inProjectManagerList", like:

        {
            "key": "cmd+j",
            "command": "workbench.action.quickOpenSelectNext",
            "when": "inProjectManagerList && isMac"
        },
        {
            "key": "cmd+shift+j",
            "command": "workbench.action.quickOpenSelectPrevious",
            "when": "inProjectManagerList && isMac"
        },
        {
            "key": "ctrl+j",
            "command": "workbench.action.quickOpenSelectNext",
            "when": "inProjectManagerList && (isWindows || isLinux)"
        },
        {
            "key": "ctrl+shift+j",
            "command": "workbench.action.quickOpenSelectPrevious",
            "when": "inProjectManagerList && (isWindows || isLinux)"
        }
    

    Working with Remotes

    The extension support Remote Development scenarios, and you may choose how to use it, depending on your needs

    I access Remotes, but most of my work is Local

    This is the regular scenario, and that's why you don't need to do anything special for the extension to work. It works out of the box.

    When installed locally, you can save any Container, SSH, WSL or Codespaces projects as Favorites. Each one will have its own icon to be properly identified, and when you select them, VS Code will open the remote automatically.

    It just works

    But what if I do most of my work on Remotes

    If you normally connect to remotes (like SSH/WSL) and would like to save Favorite projects on that remote, or to be able to auto-detect repos located on that remote, you must activate/install the extension to work on remotes.

    You just have to add the lines below on your User Settings.

        "remote.extensionKind": {
            "alefragnani.project-manager": [
                "workspace"
            ]
        },
    

    More details on VS Code documentation

    Available Settings

    You can choose how your projects are sorted

    • Saved: The order that you saved the projects
    • Name: The name that you typed for the project
    • Path: The full path of the project
    • Recent: The recently used projects
        "projectManager.sortList": "Name"
    

    List

    • Choose if the project list must be grouped by its kind (Favorites, Git, Mercurial, SVN and VS Code).
        "projectManager.groupList": true
    
    • Should the current project be removed from the list? (false by default)
        "projectManager.removeCurrentProjectFromList": true
    
    • Should identify invalid paths on project list? (true by default)
        "projectManager.checkInvalidPathsBeforeListing": false
    
    • Should support symlinks on baseFolders? (false by default)
        "projectManager.supportSymlinksOnBaseFolders": true
    
    • Should show the parent folder info when projects with same name are detected? (false by default)
        "projectManager.showParentFolderInfoOnDuplicates": true
    
    • Filter Projects Through Full Path (false by default)
        "projectManager.filterOnFullPath": true
    
    • Custom projects file (projects.json) location

    If you intend to share projects between Stable and Insider installations, or if you store your settings in different locations (cloud services), you can indicate an alternative location (folder path) for the projects.json file.

        "projectManager.projectsLocation": "C:\\Users\\myUser\\AppData\\Roaming\\Code\\User"
    

    You can use ~ or $home while defining the folder path. It will be replaced by your HOME folder.

    • Automatic Detection of Projects (Git git, Mercurial git, SVN svn and VSCode vscode)
        "projectManager.git.baseFolders": [
            "c:\\Projects\\code",
            "d:\\MoreProjects\\code-*",
            "$home\\personal-coding"
        ]
    

    Indicates folders or glob patterns to search for projects

        "projectManager.git.ignoredFolders": [
            "node_modules", 
            "out", 
            "typings", 
            "test",
            "fork*"
        ],
    

    Indicates folders or glob patterns to be ignored when searching for projects

        "projectManager.git.maxDepthRecursion": 4
    

    Define how deeps it should search for projects

    • Exclude the base folders themselves from the auto-detected projects list (false by default)
        "projectManager.any.excludeBaseFoldersFromResults": true
    

    When enabled, the Any base folders configured in projectManager.any.baseFolders are not returned as projects themselves, only their matching subfolders are.

    • Should ignore projects found inside other projects? (false by default)
        "projectManager.ignoreProjectsWithinProjects": true
    
    • Cache automatically detected projects (true by default)
        "projectManager.cacheProjectsBetweenSessions": false
    
    • Display the Project Name in Status Bar (true by default)
        "projectManager.showProjectNameInStatusBar": true
    
    • Open projects in New Window when clicking in status bar (false by default)
        "projectManager.openInNewWindowWhenClickingInStatusBar": true
    
    • Indicates if the New Window command should open the project in current window, when empty (always by default)

      • always: Whenever you call the Open in New Window command, it will open in the current window, if empty
      • onlyUsingCommandPalette: Only open in the current window if you use the Command Palette
      • onlyUsingSideBar: Only open in the current window if you use the Side Bar
      • never: Works as today. The Open in New Window command will always open in New Window
        "projectManager.openInCurrentWindowIfEmpty": "always"
    
    • Indicates the list of tags you can use to organize your projects (Personal and Work by default)
        "projectManager.tags": [
            "Personal", 
            "Work",
            "VS Code",
            "Learning"
        ]
    
    • Controls how tag groups in the Favorites view are expanded or collapsed, and whether their state is remembered (startExpanded by default)

      • alwaysExpanded: Tag groups are always expanded
      • alwaysCollapsed: Tag groups are always collapsed
      • startExpanded: Tag groups start expanded and remember your last expand/collapse state
      • startCollapsed: Tag groups start collapsed and remember your last expand/collapse state
        "projectManager.tags.collapseItems": "startExpanded"
    
    • Show the current Git branch name for projects ("never" by default)
        "projectManager.git.showBranchName": "never"
    

    Supported values:

    • "never": Never display the Git branch name
    • "onlyInSideBar": Display the Git branch name only in the Side Bar
    • "onlyInCommandPalette": Display the Git branch name only in the Command Palette
    • "always": Display the Git branch name in all locations

    Available Colors

    • Choose the foreground color to highlight the current project in the Side Bar
        "workbench.colorCustomizations": {
          "projectManager.sideBar.currentProjectHighlightForeground": "#e13015"  
        }
    

    Side Bar

    The Project Manager extension has its own Side Bar, with a variety of commands to improve your productivity.

    Side Bar

    Project Tags - View and Filter

    Starting in v12.3, you can now organize your Projects with Tags.

    You can define your custom tags (via projectManager.tags setting), define multiple tags for each project, and filter the projects based on their tags.

    Side Bar

    Extension API

    If you are an extension developer and would like to interact with the Project Manager extension, you can use its public API.

    First, you must add an extensionDependencies entry in your package.json file:

      "extensionDependencies": [
        "alefragnani.project-manager"
      ],
    

    Then, retrieve the extension instance with vscode.extensions.getExtension("alefragnani.project-manager") in your source code, to be able to use the methods that the extension exposes.

    import { ProjectManagerPublicApi } from './api/projectManager/api';
    
    async function useProjectManagerApi() {
        const projectManagerApi = <ProjectManagerPublicApi>vscode.extensions.getExtension('alefragnani.project-manager')?.exports;
    
        await projectManagerApi.saveProject("My Project", "/path/to/project", ["work"], "Default");
    }
    

    The contract is defined at /api/api.d.ts.

    More details on VS Code Extension API reference

    Installation and Configuration

    You should follow the official documentation to:

    License

    GPL-3.0 with VS Code Extension Host API Exception © Alessandro Fragnani