A plugin for Flow Launcher that allows you to quickly open the recent workspaces of VS Code and VSCodium.
- 🔍 搜索最近打开的本地工作区 — 自动读取 VS Code / VSCodium 的历史记录,快速定位并打开最近使用过的文件夹或
.code-workspace工作区文件。 - 🖥️ 远程工作区支持 — 支持 WSL、SSH、Dev Containers、Codespaces 等远程环境(通过
vscode-remote://URI 识别)。 - 📁 打开所在文件夹 — 在结果上按住
Ctrl回车可直接在资源管理器中打开对应目录。 - ⚙️ 额外自定义工作区 — 在插件设置中手动添加
file:///URI 或远程 URI,作为内置历史的补充。 - 🧩 多实例自动识别 — 自动发现并区分 VS Code(Stable / Insiders / Exploration)与 VSCodium(Stable / Insiders),每个实例独立读取各自的历史记录。
- 🗂️ 远程机器直连 — 自动解析 SSH config,直接打开远程主机(可选,在设置中开关)。
默认动作关键词(Action Keyword)为 {。在 Flow Launcher 中输入关键词后即可看到最近的工作区列表。
例如输入 { 后按项目名继续过滤即可定位到对应工作区。
| 操作 | 效果 |
|---|---|
Enter |
用对应编辑器(VS Code / VSCodium)打开该工作区 |
Ctrl + Enter |
在文件资源管理器中打开工作区所在文件夹 |
在 Flow Launcher 插件设置中找到「VS Code Workspaces」进入配置:
- Discover Workspaces — 是否自动读取编辑器最近打开的工作区记录。
- Discover Machines — 是否从 SSH config 中解析并展示可直连的远程机器。
- 额外文件夹 URI — 手动添加的自定义工作区 URI 列表。
插件通过扫描 PATH 及常见安装目录自动发现以下编辑器实例:
- VS Code(Stable / Insiders / Exploration)
- VSCodium(Stable / Insiders)— VSCodium 作为 VS Code 的 OSS 构建,其历史记录存储于
.vscode-oss-shared共享存储,插件已针对性地兼容。
- .NET SDK 7.0 或更高版本
- Windows(插件基于
net7.0-windows,使用 WPF)
# 调试构建
dotnet build --configuration Debug
# 发布构建
dotnet build --configuration Release构建产物默认输出到:
- Debug:
Output\Debug\VSCodeWorkspaces\ - Release:
Output\Release\VSCodeWorkspaces\net7.0-windows\
将 Output\Debug\VSCodeWorkspaces\(或 Release 输出目录)整个复制到 Flow Launcher 的 Plugins 目录下,重启 Flow Launcher 即可加载插件。
发布流程由 release.ps1 一键驱动:确认/更新版本 → 构建打包 → 创建 tag → push → GitHub Actions 自动发布。
版本号来源是 plugin.json 的 Version 字段(如 1.5.1)。
在项目根目录执行:
.\release.bat或直接运行 PowerShell 脚本:
powershell.exe -ExecutionPolicy Bypass -File .\release.ps1脚本运行后会引导你完成以下步骤:
- 读取当前版本:显示
plugin.json中的当前版本号。 - 确认或更新版本:
- 直接按
Enter保持当前版本; - 或输入新的版本号(如
1.6.0),脚本会自动更新plugin.json的Version字段并提交该变更。
- 直接按
- 构建并打包:执行
dotnet build --configuration Release,生成VSCodeWorkspaces-v{Version}.zip。 - 创建 git tag:自动创建
v{Version}标签(若已存在会报错中止)。 - push 到 GitHub:同时推送当前分支与 tag。
推送 v*.*.* 格式的 tag 后,会触发 .github/workflows/publish.yml:
- 从 tag 快照的
plugin.json读取版本号。 - 执行
dotnet publish并打包为 ZIP。 - 通过
softprops/action-gh-release创建 GitHub Release 并上传 ZIP。
因此发布全程无需手动创建 Release——只要 push tag 即可。
注意:
publish.yml需要contents: write权限才能创建 Release(已配置permissions.contents.write)。若遇到 403,请在仓库 Settings → Actions → General → Workflow permissions 中开启 "Read and write permissions"。
- 读取 / 校验 / 更新
plugin.json版本号。 - 删除同版本号的旧 ZIP(避免覆盖冲突)。
- 执行
dotnet build --configuration Release。 - 将插件文件(dll、Images、plugin.json 等)直接压入 ZIP 根目录(不包含多余的目录层级),便于 Flow Launcher 直接解压使用。
- 创建 tag 并 push,触发 GitHub Actions 自动发布。
提示:压缩包内应直接包含
plugin.json、Flow.Plugin.VSCodeWorkspaces.dll、Images\等文件(没有外层文件夹),这样用户解压到Plugins目录即可正常加载。
如不使用脚本,也可手动操作:
- 在
plugin.json中更新Version字段并提交。 - 构建 Release 并打包 ZIP。
- 创建 tag
v{Version}并 push:git tag -a v1.6.0 -m "Release v1.6.0" git push origin v1.6.0
- 等待 GitHub Actions 自动生成 Release。
The original source code is from Microsoft PowerToys.
Hope you enjoy it!
