本文详细指导如何在Windows系统中通过创建注册表文件,将Visual Studio Code设置为默认编辑器,并在文件夹操作中便捷启动。只需几步操作,轻松实现VSCode的全局关联。
第一步:
创建一个记事本名为vsCode.reg
后缀为.reg
第二步:
编辑记事本,将以下代码粘入
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with Code"
"Icon"="D:\\mySoftwareAndGames\\software\\developSoftware\\visualStudioCode\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"D:\\mySoftwareAndGames\\software\\developSoftware\\visualStudioCode\\Code.exe\" \"%1\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open with Code"
"Icon"="D:\\mySoftwareAndGames\\software\\developSoftware\\visualStudioCode\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"D:\\mySoftwareAndGames\\software\\developSoftware\\visualStudioCode\\Code.exe\" \"%V\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open with Code"
"Icon"="D:\\mySoftwareAndGames\\software\\developSoftware\\visualStudioCode\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"D:\\mySoftwareAndGames\\software\\developSoftware\\visualStudioCode\\Code.exe\" \"%V\""