我正在為 VS Code 尋找類似這樣的擴展:
https
://marketplace.visualstudio.com/items?itemName=
norachuga.MiddleClickDefinition 它在 WebStorm 中原生支持,我想切換到 VSC,這真的很煩人。
我在谷歌上沒有找到任何結果。
有沒有關于如何創建一個好的教程或代碼?
uj5u.com熱心網友回復:
作者信用:https ://github.com/danielsamuels
對于那些正在尋找短期解決方案的人,我創建了一個AutoHotkey腳本,它提供了中鍵單擊 Go To Definition 行為:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#IfWinActive ahk_exe Code.exe
~MButton::
MouseGetPos, xpos, ypos
if (ypos >= 87) {
SendInput,{Click}{F12}
}
return
將上述內容復制到名為 vscode-f12-go-to-definition.ahk 的檔案中并運行。您會在系統托盤中看到一個綠色的 H 圖示,表明它正在運行。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/454164.html
