乐于分享
好东西不私藏

AutoHotKey脚本提升VSCode使用体验

AutoHotKey脚本提升VSCode使用体验

AutoHotKey脚本提升VSCode使用体验

AutoHotKey脚本提升VSCode使用体验

靓仔们,今天分享个新调教好的自用脚本。大大提高VSCode和Antigravity等编辑器的使用体验:用AutoHotKey脚本实现在编辑器区域用鼠标中键进入函数。
脚本如下:
“`
#Requires AutoHotkey v2
; Context: Only activate when VS Code or Antigravity is the active window
#HotIf WinActive(\”ahk_exe Code.exe\”) or WinActive(\”ahk_exe Antigravity.exe\”)
; Middle Mouse Button: Ctrl+Click in editor, normal click on tabs
MButton::
{
; Get mouse position relative to the active window\’s client area (default behavior)
MouseGetPos(&MouseX, &MouseY)
; Tab area height – adjust this value if needed (try 60, 70, 80, 90, etc.)
TabAreaHeight := 70
; If MouseY is less than height, we are in the top area (Tabs/Title)
if (MouseY < TabAreaHeight) {
; In tab area: normal middle-click to close tabs
Click(\”Middle\”)
}
else {
; In editor area: Ctrl+Click for multi-cursor
Send(\”{Ctrl down}\”)
Click
Send(\”{Ctrl up}\”)
}
}
; Reset context for all other applications
#HotIf
“`
#编程 #vscode #antigravity #autohotkey #AI工具 #cursor
本站文章均为手工撰写未经允许谢绝转载:夜雨聆风 » AutoHotKey脚本提升VSCode使用体验
×
订阅图标按钮