TGTGInsighttelegram intelligenceLIVE / telegram public index
Post content
帖子内容
朋友前幾天傳了個截圖,問說 Visual Studio Code 裡某個按鈕的名稱叫什麼,說自己找不太到。 我想說他截圖裡不就顯示是 Open File 了嗎?開了 Electron 的 DevTools 去看的確也真的標示是 Open File 無誤。 — 多問了兩句,他想要解決的問題是這樣子的: 在 Visual Studio Code 下,在 Version Control 頁簽選擇檔案時,會自動打開水平切分的 diff 檢視頁,截圖的按鈕可以點擊直接跳轉到該檔案。 他想要設定一組快捷鍵來方便切換檔案頁面與 diff 檢視頁面。 其實他找的名稱沒錯,就只是少了一些設定,因為在 VSCode 的 keybindings.json 中還可以加上 `when` 情境上下文: json { "key": "ctrl+shift+q", "command": "git.openFile", "when": "editorFocus && isInDiffEditor" }, { "key": "ctrl+shift+q", "command": "git.openChange", "when": "editorFocus && !isInDiffEditor" }