场景
安装VSC的时候忘了自定义安装,勾选右键菜单选项,每次都要在VSCODE中找到对应文件夹进行打开很繁琐。
解决
通过注册表添加VSC的选项。
你只需要把对应路径修改为你本地的路径即可,一般也只需要修改路径前缀即可,使用文本替换一秒搞定
参考注册表配置:
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="F:\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"F:\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
@="Open with VSCode"
"Icon"="\"F:\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
@=&#