怎么把vscode加入右键

首先新建一个code.reg文件 ,使用其他编辑器打开,如subline打开

打开之后是这样的:把vscode的安装路径加入到脚本中,例如我的路径是 C:\\Users\\Owner\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\

单斜杠换成双斜杠,最后双击把它加入到注册表中,这是右键会显示 open  with code,这样就完成了

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with Code"
"Icon"="C:\\Users\\Owner\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"

[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"C:\\Users\\Owner\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open with Code"
"Icon"="C:\\Users\\Owner\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"

[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"C:\\Users\\Owner\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open with Code"
"Icon"="C:\\Users\\Owner\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"

[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"C:\\Users\\Owner\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""

你可能感兴趣的:(学习记录)