vscode 添加右键设置使用vscode打开

第一步:
配置文件 新建文本文档.txt
D:\installPath\Microsoft VS Code\Code.exe 注意将此地方换成自己的vscode的安装目录就行

Windows Registry Editor Version 5.00

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

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

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

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

Windows Registry Editor Version 5.00

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

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

第二步 改配置文件的后缀为 .reg,例如:新建文本文档.reg
第三步 双击 新建文本文档.reg
如果出现安全警告或者弹框,需要选择“允许程序本次执行”,就可以成功添加右键设置使用vscode打开。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容