VSCode扩展快速导入导出

ㅤㅤ经常需要在空白环境使用VSCode,每次都要单独下载扩展,而且有时候需要的扩展太多,手动一个一个去搜索下载实在是太麻烦,故记录这么一篇快速导出导入VSCode扩展的方法,免了每次去网上现查教程。

一、联网环境

  • 1.导出

ㅤㅤ选择一个用于保存文件的目录shift+右键打开终端,执行这条命令,即可导出VSCode中已下载的扩展清单:

code --list-extensions > extensions.txt
  • 2.导入

ㅤㅤ下载上一步导出的 extensions.txt,进入到extensions.txt所在目录

Get-Content extensions.txt | ForEach-Object { code --install-extension $_ }

ㅤㅤ下方是我个人用于空白环境快速开发的extensions.txt清单,可以直接运行上一条命令导入。

akamud.vscode-theme-onedark
antfu.goto-alias
antfu.iconify
antfu.unocss
bmewburn.vscode-intelephense-client
bradlc.vscode-tailwindcss
brandonfowler.exe-runner
burkeholland.simple-react-snippets
christian-kohler.path-intellisense
coder911th.vuetify-camelcase-snippets
css-format-one-line.css-format-one-line
dadroit.dadroit-json-generator
davidanson.vscode-markdownlint
daxiang.tp5-snippet
devsense.phptools-vscode
devsense.profiler-php-vscode
donjayamanne.javadebugger
dsznajder.es7-react-js-snippets
ecmel.vscode-html-css
elemefe.vscode-element-helper
esbenp.prettier-vscode
fcrespo82.markdown-table-formatter
formulahendry.auto-close-tag
formulahendry.auto-complete-tag
formulahendry.auto-rename-tag
formulahendry.code-runner
gaiyaobedmathias.vuetify-snippets
github.vscode-github-actions
golang.go
hbenl.vscode-test-explorer
hollowtree.vue-snippets
hookyqr.minify
iceworks-team.iceworks-time-master
inferrinizzard.prettier-sql-vscode
intellsmi.comment-translate
jinxdash.prettier-rust
kevinrose.vsc-python-indent
maggie.eslint-rules-zh-plugin
manasxx.background-cover
marscode.marscode-extension
mikoz.black-py
ms-azuretools.vscode-docker
ms-ceintl.vscode-language-pack-zh-hans
ms-edgedevtools.vscode-edge-devtools
ms-python.black-formatter
ms-python.debugpy
ms-python.python
ms-python.vscode-pylance
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-wsl
ms-vscode.makefile-tools
ms-vscode.test-adapter-converter
ms-vscode.vscode-typescript-next
ms-vsliveshare.vsliveshare
msjsdiag.vscode-react-native
naumovs.color-highlight
nuxt.mdc
nuxtr.nuxt-vscode-extentions
nuxtr.nuxtr-vscode
obkoro1.korofileheader
octref.vetur
oderwat.indent-rainbow
pkief.material-icon-theme
pmneo.tsimporter
primafuture.open-php-html-js-in-browser
redhat.java
ritwickdey.liveserver
sandipchitale.vscode-java-debug-ext
satiromarra.vscode-php-test-explorer-docker
shenjiaolong.vue-helper
steoates.autoimport
syler.sass-indented
tamasfe.even-better-toml
techer.open-in-browser
tonybaloney.vscode-pets
utsavm9.c-cpp-flag-debugging
visualstudioexptteam.intellicode-api-usage-examples
visualstudioexptteam.vscodeintellicode
vscjava.vscode-java-debug
vscjava.vscode-java-dependency
vscjava.vscode-java-pack
vscjava.vscode-java-test
vscjava.vscode-maven
vue.volar
vuetifyjs.vuetify-vscode
wejectchan.vue3-snippets-for-vscode
windmilleng.vscode-go-autotest
wscats.cors-browser
xabikos.javascriptsnippets
xdebug.php-debug
zainchen.json

二、离线环境

ㅤㅤ搜索要下载的拓展,进入详情页点击Version History,下载好VSIX格式的离线扩展

  • 2.建个.bat文件,实现快速批量导入
@echo off
title 批量安装 VSCode 扩展
echo 安装当前目录下所有的 VSCode 扩展组件…
echo.
D:
cd D:\Development\Tools\VSCode\bin
for %%1 in (*.vsix) do code --install-extension %%1

ㅤㅤ将.bat批处理脚本和下载好的离线扩展放到一个文件夹,双击运行批处理即可批量导入。

ㅤㅤ由于中文扩展装好后不会自动弹出提示切换语言,自己ctrl+shift+p,输入display language-选择中文即可

暂无评论

发送评论 编辑评论


				
上一篇
下一篇