Visual Studio Code 扩展 - 鼠标中键单击转到定义

che*_*zer 7 webstorm visual-studio-code

我正在寻找 VS Code 的扩展,如下所示: https:
//marketplace.visualstudio.com/items?
itemName=norachuga.MiddleClickDefinition WebStorm 本身支持它,我想切换到 VSC,这真的很烦人。
我在谷歌上没有找到任何结果。
有没有关于如何创建一个好的教程或代码?

Ped*_*eto 6

作者信用: https: //github.com/danielsamuels

对于那些正在寻找短期解决方案的人,我创建了一个AutoHotkey脚本,它提供了中键单击“转到定义”行为:

#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
Run Code Online (Sandbox Code Playgroud)

将上述内容复制到名为 vscode-f12-go-to-definition.ahk 的文件中并运行。您将在系统托盘中看到一个绿色的 H 图标,表明它正在运行。