windows-7 - 右键单击文件夹后不出现 Visual Studio Code "Open With Code"

标签 windows-7 visual-studio-code windows-7-x64

刚刚在 Windows 7 计算机上安装了 Visual Studio Code 1.1.1。当我右键单击文件夹时,不会出现“使用代码打开”。

enter image description here

最佳答案

复制自 Right click on Windows folder and open with Visual Studio Code

  • 使用以下内容创建文件vsCodeOpenFolder.reg(如果您没有选择默认安装路径,则需要调整此文件中的路径):

     Windows Registry Editor Version 5.00
     ; Open files
     [HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
     @="Edit with VS Code"
     "Icon"="C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe,0"
     [HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
     @="\"C:\\Program Files (x86)\\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 (x86)\\Microsoft VS Code\\Code.exe\",0"
     [HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
     @="\"C:\\Program Files (x86)\\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 (x86)\\Microsoft VS Code\\Code.exe\",0"
     [HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
     @="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%V\""
    
  • 双击它以创建注册表项。

  • 如果“用代码打开”没有出现在资源管理器的上下文菜单中,那么您应该重新启动系统。

  • 如果您运行的是 64 位或 Insiders 版本的 VS Code,请相应地更改路径。 IE。 C:\\Users\\[用户名]\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe

关于windows-7 - 右键单击文件夹后不出现 Visual Studio Code "Open With Code",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37306672/

相关文章:

windows-7 - 在 Windows 7 中,如何将 Ctrl-C 或 Ctrl-Break 发送到单独的进程

visual-studio-code - 如何从 Linux 上的命令行打开 Visual Studio Code?

typescript - Typescript 和 VSCode 的简单问题

python - 如何让别人使用我的 Python 脚本

php - cakePHP 内存缓存逻辑不工作

batch-file - 如何保存包含俄语或中文字符的文件的目录列表

c# - 使用在锁定工作站上打开的应用程序登录 Windows 7

ios - 从 Windows 移动到 mac 后,M1 上的 Flutter : GoogleMapsBase & Flutter. h 未发现错误

python - Django框架安装

c# - 如何正确安装 stylecop?