久久无码中文字幕_日韩精品无码一本二本三_久久精品呦女暗网_欧美一级夜夜爽_久久精品国产99久久99久久久

22
2020/07

如何讓文件支持右鍵vscode打開

發(fā)布時間:2020-07-22 11:03:40
發(fā)布者:會飛的魚
瀏覽量:
0

在前端工作中編輯器作為程序員編輯代碼的工具是必不可少的,在編輯器的選擇上每個人也會各有不同,但是絕大多數(shù)人還是會以熟悉、便利方便操作為原則來選擇編輯器,一個好的編輯器可以讓你很輕松的打開一個文件。本人使用的是vscode,文匯軟件小編就跟大家分享下如何讓你通過右鍵直接打開一個文件。

首先我們需要先新建一個叫 vscode.reg 的注冊表文件,這里的名可以隨便起,但是最好是起方便找到的名字,方便后期的編輯和更改。

1595387903(1).jpg

Windows Registry Editor Version 5.00 


; Open files 

[HKEY_CLASSES_ROOT\*\shell\Open with VS Code] 

@="Edit with VS Code" 

"Icon"="C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe,0" 


[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command] 

@="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.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 with VSCode" 

"Icon"="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe\",0" 


[HKEY_CLASSES_ROOT\Directory\shell\vscode\command] 

@="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.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 with VSCode" 

"Icon"="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe\",0" 


[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command] 

@="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe\" \"%V\""

C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe,0" 


[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command] 

@="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.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 with VSCode" 

"Icon"="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe\",0" 


[HKEY_CLASSES_ROOT\Directory\shell\vscode\command] 

@="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.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 with VSCode" 

"Icon"="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe\",0" 


[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command] 

@="\C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe\" \"%V\""

這里的C:\\Users\\ticktock\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe替換為你自己vscode的路徑,注意/需要轉(zhuǎn)義為//,

新建好后雙擊該文件

1595388186(1).jpg

它會自動識別為注冊表文件,之后隨便找一個文件夾右鍵點open with vscode就可以打開這個文件了

1595388389(1).jpg

1595388513(1).jpg

好了,以上就是小編分享的文章了,如想關(guān)注就來文匯軟件吧。

關(guān)鍵詞:
返回列表