8°

将vscode快捷方式添加到鼠标右键工具栏中解决方案

##### 解决一:
- 重装 vscode (...)

##### 解决二:
- 新建一个"vsCodeOpenByFolder"文件,复制如下代码,
- 将(直接填写路径)六个字修改为自己vsCode的路径(如:D:\\SoftwareStudy\\Microsoft VS Code\\Code.exe),
- 然后将文件后缀修改为".reg",双击运行vsCodeOpenByFolder.reg,
- 弹出注册表编辑器点击“是”。

-----------------------------------------------------------------

Windows Registry Editor Version 5.00   

; Open files   
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]   
@="Edit with VS Code"   
"Icon"="直接填写路径,0"   

[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]   
@="\"直接填写路径\" \"%1\""   

; This will make it appear when you right click ON a folder   
; The "Icon" line can be removed if you don't want the icon to appear   

[HKEY_CLASSES_ROOT\Directory\shell\vscode]   
@="Open Folder as VS Code Project"   
"Icon"="\"直接填写路径\",0"   

[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]   
@="\"直接填写路径\" \"%1\""   

; This will make it appear when you right click INSIDE a folder   
; The "Icon" line can be removed if you don't want the icon to appear   

[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]   
@="Open Folder as VS Code Project"   
"Icon"="\"直接填写路径\",0"   

[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]   
@="\"直接填写路径\" \"%V\""
直接填写路径,0"   

[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]   
@="\"直接填写路径\" \"%1\""   

; This will make it appear when you right click ON a folder   
; The "Icon" line can be removed if you don't want the icon to appear   

[HKEY_CLASSES_ROOT\Directory\shell\vscode]   
@="Open Folder as VS Code Project"   
"Icon"="\"直接填写路径\",0"   

[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]   
@="\"直接填写路径\" \"%1\""   

; This will make it appear when you right click INSIDE a folder   
; The "Icon" line can be removed if you don't want the icon to appear   

[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]   
@="Open Folder as VS Code Project"   
"Icon"="\"直接填写路径\",0"   

[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]   
@="\"直接填写路径\" \"%V\""

本文由【jellydd】发布于开源中国,原文链接:https://my.oschina.net/u/4143235/blog/3158083

全部评论: 0

    我有话说: