使用Anaconda自动安装了VS Code。 然而,发现右键没有了VS Code的功能。。。
![](https://img.haomeiwen.com/i77550/d9d22ff8ea48fb80.png)
默认下, Anaconda安装的VS Code在C:/Program Files里面。上网找了一下右键菜单的方法,和之前一样都是注册表修改。
解决的方式是可以自己重新安装, 然后选中选项。
或者在桌面新建记事本文件,然后打开添加如下代码:
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%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"="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%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"="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""
将其另存为vsCodeOpenFolder.reg
文件
注意:VS Code的安装路径这里使用的是默认的“C:\Program Files\Microsoft VS Code\” 你要换成你安装的路径才对。
然后双击这个文件就行了, 如果有问题就以管理员的身份运行。
网友评论