Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>VSCode Config MigratorNew to Visual Studio Code? Get it now.
VSCode Config Migrator

VSCode Config Migrator

ts-org

| (0) | Free
Export/import editor settings, extensions, snippets, and profiles for seamless migration across machines
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VSCode Config Migrator

Visual Studio Marketplace License

一个用于 Cursor/VSCode 编辑器的配置迁移插件,支持无缝导出/导入设置、快捷键、代码片段、任务、扩展和 Profiles(配置档案)。

功能特性

  • 📦 完整导出: 导出 settings.json、keybindings.json、snippets、tasks、extensions 和 Profiles
  • 🔄 无缝导入: 一键导入所有配置到新机器
  • 🗂️ Profile 支持: 支持多 Profile 的导出/导入,完美解决识别问题
  • 💾 Storage 迁移: 可选处理 state.vscdb (SQLite),确保扩展状态正确恢复
  • ⚡ 批量扩展安装: 自动安装所有扩展,生成官方标准的 extensions.json
  • 🎯 选择性导出: 可选择导出哪些组件
  • 🔧 多编辑器支持: 同时支持 VS Code 和 Cursor 编辑器

安装

从 Marketplace 安装

在 VS Code 或 Cursor 中:

  1. 打开扩展面板 (Ctrl+Shift+X)
  2. 搜索 "VSCode Config Migrator"
  3. 点击安装

或直接访问:Visual Studio Marketplace

本地开发安装

pnpm install
pnpm run compile

在 VS Code/Cursor 中按 F5 启动调试。

使用方法

导出配置

  1. 打开命令面板 (Ctrl+Shift+P)
  2. 输入 Config Migrator: Export Editor Config
  3. 选择导出位置和要导出的内容
  4. 点击导出

导入配置

  1. 打开命令面板 (Ctrl+Shift+P)
  2. 输入 Config Migrator: Import Editor Config
  3. 选择导入文件(.zip 或 .json)
  4. 选择导入选项
  5. 点击导入
  6. 重要: 使用任务管理器强制结束所有编辑器进程(不要使用 Reload Window)
  7. 重新打开编辑器

导出/导入选项说明

导出和导入时可以勾选要迁移的内容。前面几项是常规配置,默认勾选:

基本配置(默认勾选)

选项 说明
Settings 用户设置 (settings.json)
Keybindings 快捷键配置 (keybindings.json)
Snippets 代码片段
Tasks 任务配置
Extensions 扩展列表,导入时自动安装

可选数据(默认不勾选)

选项 内容 说明
Extension globalState state.vscdb (SQLite 数据库) 扩展内部状态,如视图状态、缓存等。文件通常较大(几十 MB)。
Extension storage folders globalStorage/<扩展id>/ 扩展自定义的缓存/数据文件

什么时候才需要勾选可选数据?

只有当你想把插件的"记忆/登录状态/历史记录"一起搬到新机器时才勾选。若只是迁移设置、快捷键、代码片段和扩展列表,保持默认不勾即可,还能减少打包体积。

Profile 识别问题解决方案

本插件完美解决了 Profile 导入后不被编辑器识别的问题:

问题原因

VS Code/Cursor 的 Profile 识别依赖:

  1. User/globalStorage/storage.json 中的 userDataProfiles[] 注册项
  2. User/profiles/<location>/ 目录中的实体文件
  3. 正确的 extensions.json 格式(数组形式,非 recommendations)

解决方案

导入时会:

  1. ✅ 写入 Profile 目录和文件
  2. ✅ 注册到 storage.json
  3. ✅ 写入 pending sidecar(防止编辑器覆盖)
  4. ✅ 安装扩展并生成标准 extensions.json
  5. ✅ 提示用户强制结束编辑器进程

可用命令

  • Config Migrator: Export Editor Config - 导出所有配置
  • Config Migrator: Import Editor Config - 导入配置
  • Config Migrator: Export Current Profile - 导出当前 Profile
  • Config Migrator: Import Profile - 导入单个 Profile
  • Config Migrator: Quick Export All - 快速导出到默认位置
  • Config Migrator: Quick Import All - 快速导入
  • Config Migrator: Finalize Profile Registration - 完成 Profile 注册(自动在激活时执行)

平台支持

平台 VS Code Cursor
Windows ✅ ✅
macOS ✅ ✅
Linux ✅ ✅

技术特性

  • ✅ 使用 better-sqlite3 处理 state.vscdb(可选,懒加载)
  • ✅ 正确的 Profile 元数据创建
  • ✅ 官方标准的 IStoredProfileExtension 格式
  • ✅ 支持 ZIP、JSON 和分离文件导出格式
  • ✅ JSONC 解析(支持带注释的 JSON)
  • ✅ 增量导入(merge/overwrite/newProfilesOnly)

与类似插件的区别

相比市场上现有的 Config Migrator 插件,本插件提供:

  • ✅ Profile 完整支持:导出/导入完整的配置档案
  • ✅ 多编辑器支持:同时支持 VS Code 和 Cursor
  • ✅ 扩展自动安装:导入时自动安装所有扩展
  • ✅ state.vscdb 处理:可选迁移扩展的内部状态
  • ✅ 完善的冲突处理:支持合并、覆盖、仅新增三种模式

许可证

MIT

反馈与贡献

欢迎在 GitHub Issues 提交问题或建议。

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft