window 右键菜单添加 vscode

重要的事情说三遍

C:\\Program Files\\Microsoft VS Code\\Code.exe,一定要写[ \\ ];不然不起作用,把这个安装路径换成你的安装路径


我最终想要的效果如上图所示: 
window 右键菜单添加 vscode

实现
新建一个名为 1.reg 的文件,找一个记事本或者sublime打开,名称无所谓,但是一定需要带上 .reg 后缀。
查看你自己的电脑的vscode安装目录,最简单的方法就是右键桌面的vscode,查看属性就知道了。以我的安装地址为例:C:\\Program Files\\Microsoft VS Code\\Code.exe , 单反斜杠最好都换成双反斜杠。
复制一下内容到 1.reg 文件中。

Windows Registry Editor Version 5.00

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

[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""

Windows Registry Editor Version 5.00

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

[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"C:\\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"="C:\\Program Files\\Microsoft VS Code\\Code.exe"

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

替换所有vscode的安装路径。
双击这个文件,之后都选 “是”。
--------------------- 
作者:GreekMrzzJ 
来源:CSDN 
原文:https://blog.csdn.net/GreekMrzzJ/article/details/82194913 
版权声明:本文为博主原创文章,转载请附上博文链接!

相关文章:

  • 2021-11-13
  • 2021-10-12
  • 2021-09-28
  • 2021-10-12
  • 2021-11-23
  • 2021-12-16
  • 2021-11-13
  • 2022-01-12
猜你喜欢
  • 2021-09-28
  • 2021-11-23
  • 2021-09-07
  • 2021-11-13
  • 2021-11-13
  • 2021-11-24
  • 2021-11-24
  • 2021-08-01
相关资源
相似解决方案