Visual Studio Code“用代码打开"右键单击文件夹后不显示 [英] Visual Studio Code "Open With Code" does not appear after right-clicking a folder

查看:33
本文介绍了Visual Studio Code“用代码打开"右键单击文件夹后不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚在 Windows 7 机器上安装了 Visual Studio Code 1.1.1.当我右键单击文件夹时,没有出现使用代码打开".

Just installed Visual Studio Code 1.1.1 on a Windows 7 machine. When I right-click on a folder, "Open With Code" does not appear.

推荐答案

复制自 右键Windows文件夹,用Visual Studio Code打开

  • 用这个内容创建文件vsCodeOpenFolder.reg(如果你没有选择默认安装路径那么你需要调整这个文件中的路径):

  • Create file vsCodeOpenFolder.reg with this content (If you didn't choose the default installation path then you need to adjust the paths in this file):

 Windows Registry Editor Version 5.00
 ; Open files
 [HKEY_CLASSES_ROOT*shellOpen with VS Code]
 @="Edit with VS Code"
 "Icon"="C:\Program Files (x86)\Microsoft VS Code\Code.exe,0"
 [HKEY_CLASSES_ROOT*shellOpen with VS Codecommand]
 @=""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_ROOTDirectoryshellvscode]
 @="Open Folder as VS Code Project"
 "Icon"=""C:\Program Files (x86)\Microsoft VS Code\Code.exe",0"
 [HKEY_CLASSES_ROOTDirectoryshellvscodecommand]
 @=""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_ROOTDirectoryBackgroundshellvscode]
 @="Open Folder as VS Code Project"
 "Icon"=""C:\Program Files (x86)\Microsoft VS Code\Code.exe",0"
 [HKEY_CLASSES_ROOTDirectoryBackgroundshellvscodecommand]
 @=""C:\Program Files (x86)\Microsoft VS Code\Code.exe" "%V""

  • 双击它以创建注册表项.

  • Double click it to create the registry entries.

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

    If the "Open with Code" doesn't appear in the Explorer's context menu then you should restart your system.

    如果您运行的是 64 位或 Insiders 版本的 VS Code,请相应地更改路径.

    If you're running the 64-bit or Insiders version of VS Code, change the path accordingly.

    这篇关于Visual Studio Code“用代码打开"右键单击文件夹后不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆