引言
安装VSCode的时候,如果你没有勾选下面这两项,那么右键菜单就没有VSCode,但你又特别想要怎么办?最简单的方法就是卸载重装,要不你就通过注册表将VSCode添加到右键菜单,注册表添加教程如下。
1、新建vscode.reg
文件,并写入以下内容
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with Code"
"Icon"="D:\\Program Files\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"D:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open with Code"
"Icon"="D:\\Program Files\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"D:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open with Code"
"Icon"="D:\\Program Files\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"D:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""
2、Ctrl+H将D:\\Program Files\\Microsoft VS Code\\Code.exe
替换你电脑上VSCode的安装路径
3、双击运行并选择是
1、桌面空白处右击正常显示VSCode菜单 2、文件(比如一张图片)上右击正常显示VSCode菜单
3、文件夹上右击正常显示VSCode菜单
https://www.cnblogs.com/jswl/p/9935998.html