window 右鍵選單中新增在vs code 開啟

2022-07-22 01:06:12 字數 1382 閱讀 9162

吃碼小妖:以前安裝vs code可以的,後面不知道為什麼不能右鍵在vs code中開啟了。於是,在網上搜尋到下面的方法。

實驗效果:有效。

結果如下:

我最終想要的效果如上圖所示:

- 右鍵資料夾,可以使用vscode開啟

- 右鍵單檔案,可以使用vscode開啟

- 右鍵空白處,可以使用vscode開啟

實現新建乙個名為 1.reg 的檔案,找乙個記事本或者sublime開啟,名稱無所謂,但是一定需要帶上 .reg 字尾。

檢視你自己的電腦的vscode安裝目錄,最簡單的方法就是右鍵桌面的vscode,檢視屬性就知道了。以我的安裝位址為例:c:\program files\microsoft vs code\code.exe , 單反斜槓最好都換成雙反斜槓。

複製一下內容到 1.reg 檔案中。

windows registry editor version 5.00

[hkey_classes_root\*\shell\vscode]

@="open with code"

"icon"="d:\\program\\microsoft vs code\\code.exe"

[hkey_classes_root\*\shell\vscode\command]

@="\"d:\\program\\microsoft vs code\\code.exe\" \"%1\""

windows registry editor version 5.00

[hkey_classes_root\directory\shell\vscode]

@="open with code"

"icon"="d:\\program\\microsoft vs code\\code.exe"

[hkey_classes_root\directory\shell\vscode\command]

@="\"d:\\program\\microsoft vs code\\code.exe\" \"%v\""

windows registry editor version 5.00

[hkey_classes_root\directory\background\shell\vscode]

@="open with code"

"icon"="d:\\program\\microsoft vs code\\code.exe"

[hkey_classes_root\directory\background\shell\vscode\command]

@="\"d:\\program\\microsoft vs code\\code.exe\" \"%v\""

替換所有vscode的安裝路徑。

雙擊這個檔案,之後都選 「是」。

新增右鍵選單

在右鍵選單中新增 壓縮 和 解壓 選單,壓縮和解壓時自動加密。0 準備工作 1 建立.reg檔案 分別建立壓縮和解壓選單登錄檔檔案 compression.reg decompression.reg compression.reg windows registry editor version 5....

右鍵 新增Git Bash Here選單

步驟 1 通過在 執行 中輸入 regedit 開啟登錄檔。2 找到 hkey classes root directory background 3 在 background 下如果沒有 shell 則右鍵 新建項 shell 4 在 shell 下右鍵 新建項 open in git 其值為 g...

右鍵 新增Git Bash Here選單

步驟 1 通過在 執行 中輸入 regedit 開啟登錄檔。2 找到 hkey classes root directory background 3 在 background 下如果沒有 shell 則右鍵 新建項 shell 4 在 shell 下右鍵 新建項 open in git 其值為 g...