配置右键菜单中使用vscode打开文件和文件夹

2022-08-20  本文已影响0人  菜蚴菜

1、新建一个空的注册表setting.reg
2、把以下内容写入,注意替换 G:\Microsoft VS Code\Code.exe 为电脑实际的vscode的安装目录(通过在安装的vscode快捷图标上右键->选择【属性】 既能看到安装目录)

Windows Registry Editor Version 5.00


[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with VSCode"
"Icon"="G:\\Microsoft VS Code\\Code.exe"

[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"G:\\Microsoft VS Code\\Code.exe\" \"%1\""
    
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open with VSCode"
"Icon"="G:\\Microsoft VS Code\\Code.exe"

[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"G:\\Microsoft VS Code\\Code.exe\" \"%V\""

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open with VSCode"
"Icon"="G:\\Microsoft VS Code\\Code.exe"

[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"G:\\Microsoft VS Code\\Code.exe\" \"%V\""

3、双击执行注册表,如果安装以后没有效果,建议重启电脑

上一篇下一篇

猜你喜欢

热点阅读