将编辑器(vscode)添加到鼠标右键运行
程序员文章站
2022-03-09 18:20:44
...
文章目录
1.在桌面创建一个.reg的文件,例如:add.reg
2…然后打开记事本编辑,将下面代码输入并保存
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with Code"
"Icon"="D:\\Microsoft Visual Studio Code\\Microsoft Visual Studio Code\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"D:\\Microsoft Visual Studio Code\\Microsoft Visual Studio Code\\Code.exe\" \"%1\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open with Code"
"Icon"="D:\\Microsoft Visual Studio Code\\Microsoft Visual Studio Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"D:\\Microsoft Visual Studio Code\\Microsoft Visual Studio Code\\Code.exe\" \"%V\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open with Code"
"Icon"="D:\\Microsoft Visual Studio Code\\Microsoft Visual Studio Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"D:\\Microsoft Visual Studio Code\\Microsoft Visual Studio Code\\Code.exe\" \"%V\""
其中全部D:\Microsoft Visual Studio Code\Microsoft Visual Studio Code\Code.exe都是你自己vscode的存放路径
将其改成你自己电脑上code.exe的存放路径即可