背景:每次使用vscode切换项目都特别不爽,在某视频中发现有这种快速打开VS code的方式,故做此记录
使用注册表的方式添加
1、找到VS code的路径
- 右键桌面的vscode,查看属性,就可知道路径(没有的可以win+q搜索vscode在进入文件位置)
- 例如我的为:F:\Program Files\VSCode-win32-x64-1.49.1\Code.exe
- 修改为双\:F:\\Program Files\\VSCode-win32-x64-1.49.1\\Code.exe
2、新建一个后缀为reg的注册表项文件
新建txt文档,修改后缀为reg
例如:open_vscode.reg
3、复制以下内容添加到文件中
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with Code"
"Icon"="F:\\Program Files\\VSCode-win32-x64-1.49.1\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"F:\\Program Files\\VSCode-win32-x64-1.49.1\\Code.exe\" \"%1\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open with Code"
"Icon"="F:\\Program Files\\VSCode-win32-x64-1.49.1\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"F:\\Program Files\\VSCode-win32-x64-1.49.1\\Code.exe\" \"%V\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open with Code"
"Icon"="F:\\Program Files\\VSCode-win32-x64-1.49.1\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"F:\\Program Files\\VSCode-win32-x64-1.49.1\\Code.exe\" \"%V\""
Comments 2 条评论
博主 r4ed
快递代发,礼品代发就发5a单号网www.danhw.com
博主 toomey
@r4ed 厉害!我这小站还有卖广告的,您觉得谁看呀。哈哈哈哈