且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何导出 Visual Studio Code 扩展列表?

更新时间:2022-02-14 00:37:22

自动

如果您期待一个简单的一站式工具来为您做这件事,我建议您查看 设置同步 扩展.

If you are looking forward to an easy one-stop tool to do it for you, I would suggest you to look into the Settings Sync extension.

允许

  1. 导出您的配置和扩展
  2. 与同事和团队分享.您可以更新配置.他们的设置会自动更新.
  1. Export of your configuration and extensions
  2. Share it with coworkers and teams. You can update the configuration. Their settings will auto updated.

手册

  1. 确保您拥有最新版本的 Visual Studio Code.如果您通过公司门户安装,您可能没有最新版本.

  1. Make sure you have the most current version of Visual Studio Code. If you install via a company portal, you might not have the most current version.

在机器 A

Unix:

code --list-extensions | xargs -L 1 echo code --install-extension

Windows(PowerShell,例如使用 Visual Studio Code 的集成终端):

Windows (PowerShell, e. g. using Visual Studio Code's integrated Terminal):

code --list-extensions | % { "code --install-extension $_" }

  • 将回声输出复制并粘贴到机器 B

  • Copy and paste the echo output to machine B

    样本输出

    code --install-extension Angular.ng-template
    code --install-extension DSKWRK.vscode-generate-getter-setter
    code --install-extension EditorConfig.EditorConfig
    code --install-extension HookyQR.beautify
    

  • 请确保您已安装 code 命令行.如需更多信息,请访问命令行界面 (CLI)em>.

    Please make sure you have the code command line installed. For more information, please visit Command Line Interface (CLI).