2023年7月3日发(作者:)
修改VSCode的插件安装⽬录VSCode 的插件⽬录在各平台下的默认位置如下:Windows %USERPROFILE%.vscodeextensionsmacOS ~/.vscode/extensionsLinux ~/.vscode/extensionsWindows 系统中 VSCode 编辑器的插件⽬录默认在 C 盘,extensions ⽬录会很⼤,我们可以通过⾃定义 VSCode 插件安装位置来解决:⽅法⼀(推荐,不⽤每次重启电脑):前提是已安装 VSCode,并且已将其添加到了环境变量 path 中。打开 VSCode,然后在打开的 VSCode 中点击 Terminal 菜单栏的 NewTerminal 菜单,输⼊命令code --help 命令可以查看帮助,输⼊
code --extensions-dir "your extensions dir" 命令来指定插件⽬录。如下所⽰:PS C:UsersVincent Huang> code --helpVisual Studio Code 1.44.2Usage: [options][]To read output from another program, append '-' (e.g. 'echo Hello World | -')Options -d --diff Compare two files with each other. -a --add Add folder(s) to the last active window. -g --goto Open a file at the path on the specified line and character position. -n --new-window Force to open a new window. -r --reuse-window Force to open a file or folder in an already opened window. --folder-uri Opens a window with given folder uri(s) --file-uri Opens a window with given file uri(s) -w --wait Wait for the files to be closed before returning. --locale The locale to use (e.g. en-US or zh-TW). --user-data-dir Specifies the directory that user data is kept in. Can be used to open multiple distinct instances of Code. -h --help Print ions Management --extensions-dir Set the root path for extensions. --list-extensions List the installed extensions. --show-versions Show versions of installed extensions, when using --list-extension. --category Filters installed extensions by provided category, when using --list-extension. --install-extension Installs or updates the extension. Use `--force` argument to avoid prompts. --uninstall-extension Uninstalls an extension. --enable-proposed-api Enables proposed API features for extensions. Can receive one or more extension IDs to enable eshooting -v --version Print version. --verbose Print verbose output (implies --wait). --log Log level to use. Default is 'info'. --log Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'. -s --status Print process usage and diagnostics --prof-startup Run CPU profiler during startup --disable-extensions Disable all installed extensions. --disable-extension Disable an extension. --sync Turn sync on or off --inspect-extensions Allow debugging and profiling of extensions. Check the developer tools for the connection URI. --inspect-brk-extensions Allow debugging and profiling of extensions with the extension host being paused after start. Check the developer tools for the connection URI. --disable-gpu Disable GPU hardware acceleration. --max-memory Max memory size for a window (in Mbytes). --telemetry Shows all telemetry events which VS code C:UsersVincent Huang> code --extensions-dir "D:developmenttoolsVSCode-win32-x64-1.46.1resourcesappextensions"PS C:UsersVincent Huang>
⽅法⼆右键桌⾯的 VSCode 快捷⽅式,点击属性,将⽬标由D:修改为:D: --extensions-dir "D:developmenttoolsVSCode-win32-x64-1.46.1resourcesappextensions"添加了code --extensions-dir "your extensions dir" 命令之后就会使⽤新的插件⽬录。
发布者:admin,转转请注明出处:http://www.yc00.com/web/1688382488a129659.html
评论列表(0条)