├── .gitignore ├── README.md ├── app_websites.md ├── bin ├── GlazeWM.zip ├── ScreenCapture.exe ├── install.bat ├── nircmd.exe └── nircmdc.exe ├── go.work ├── install.bat ├── src ├── autohotkey │ └── v1 │ │ ├── browser.ahk │ │ ├── chrome │ │ └── init.ahk │ │ ├── common.ahk │ │ ├── editline.ahk │ │ ├── explorer │ │ ├── init.ahk │ │ └── readme.md │ │ ├── glazewm │ │ └── init.ahk │ │ ├── komorebi │ │ └── init.ahk │ │ ├── sui.ahk │ │ ├── vscode │ │ ├── init.ahk │ │ ├── viewcontainer_focus_down.ahk │ │ └── viewcontainer_focus_up.ahk │ │ └── wezterm │ │ └── init.ahk ├── glazewm │ ├── config.yaml │ ├── install.bat │ ├── launcher.bat │ ├── uninstall.bat │ ├── wrun.c │ └── wrun.exe ├── inputrc │ └── .inputrc ├── mouseable │ ├── config.json │ ├── install.bat │ └── uninstall.bat ├── nvim │ ├── init.lua │ └── install.bat ├── surfingkeys │ ├── index.js │ └── readme.md ├── touchcursor │ ├── install.bat │ ├── settings_norman.cfg │ ├── settings_qwerty.cfg │ └── uninstall.bat └── vscode │ ├── install.bat │ ├── keybindings.json │ ├── readme.md │ └── uninstall.bat ├── sui.md ├── sui ├── layoutchanger │ ├── go.mod │ ├── go.sum │ ├── layoutchanger.exe │ ├── main.go │ └── sui_conf.json ├── not_implement.bat └── not_implement.py ├── sui编辑器接口速查表.md ├── uninstall.bat └── why not emacs and vim.md /.gitignore: -------------------------------------------------------------------------------- 1 | bin/GlazeWM.exe 2 | build/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 目前世界上最好的全键盘操作电脑软件的跨操作系统解决方案, 学习一次, 处处使用. 2 | 3 | 它是一套"通用"的跨操作系统的快捷键操作电脑的接口, 主要应用场景是写代码, 也包含其它场景 4 | 5 | 它不是一个vim的插件, 也不是一个软件. 6 | 7 | ## 安装 8 | 1. 克隆仓库, 或者下载本仓库. 目前windows系统上的sui没有任何依赖, 甚至不依赖于git. 9 | 2. 仓库根目录下面有install.bat文件, 右键, 以管理员身份运行,sui会自动把目前所支持的配置安装到你的电脑上\ 10 | 11 | - 注意: 如果之前已经你已有sui支持软件的配置,sui会自动帮你备份一次,再运行时会把之前的备份删掉,你可以查看sui的各个软件目录下的install.bat脚本来找到你备份配置的地址 12 | - 原则上sui不会帮忙安装你需要用到的软件, 由于窗口管理器glazewm目前最新的版本release有点bug,无法支持浮动窗口的移动和大小修改, 所以sui目前提供了一个自编译的glazewm的zip, 会在安装时自动解压并放入windows的自启动目录, bug修复完成时会移除这些东西 13 | - sui目前在vscode和chrome上实现接口会用了一些插件, 需要自行安装 14 | - 特殊情况: 如果你是像我一样,其它键盘布局的用户, 你需要用管理员权限启动cmd, 并且通过根目录下的 install.bat ${layout}的方式来运行, 目前sui支持norman布局, 是我正在使用的布局, 你可以通过修改配置来增加更多的布局. 15 | 16 | ## 面向人群 17 | - 在windows上希望用快捷键提高工作效率的 18 | - 双手不愿意离开主键盘的 19 | - 有鼠标手等疾病,希望尽可能少或者不使用鼠标就能完成绝大部分电脑上工作的 20 | - 觉得全键盘操作很酷,希望用来装b的 21 | 22 | ## 键盘语言的进化 23 | 24 | - 上下左右, PageUp, PageDown, Home, End 25 | - tab, alt 26 | - vim hjkl rino 27 | - sui 分层 28 | 29 | ## 为什么要使用sui 30 | 31 | - ctrl+alt+shift+win+meta+super + a 32 | - 快捷键容易冲突(对比鼠标) 33 | - 每个软件快捷键的逻辑都不一样 34 | 35 | ## 设计目标 36 | - 使用最通用的ansi键盘 37 | - 跨操作系统, 跨机器 38 | - 解决快捷键冲突问题, 包括和远程机器上的冲突 39 | - 易于记忆,易于学习 40 | 41 | ## 名词解释 42 | 资源 软件所管理内容的最小单元 43 | window(窗口) 屏幕上的一块地方,进行操作的最小单元 pane 44 | tab(标签) window的集合 workspace 45 | session(持久化) tab和window的集合 layout 46 | 47 | ## 软件分类 48 | 49 | | 软件类型 | 功能键 | 50 | | -------------- | -------------- | 51 | | 窗口管理器 i3wm | ctrl | 52 | | gui中普通软件(除了有vim模式的文本编辑器) | alt | 53 | | 可以连接ssh管理终端的软件(主要包括终端,浏览器) | ctrl+alt | 54 | | 终端多路复用器(cli) tmux, screen, zellij | alt | 55 | | cli中普通软件 | ,或者无功能键 | 56 | | vim模式的文本编辑器 | , | 57 | 58 | ## 按键介绍和联想 59 | 60 | | 按键意义 | norman | 联想 | qwerty | 联想 | 61 | | -------------- | ------ | ------- | ------ | ------ | 62 | | 不用 | hjk | | typ | | 63 | | 保留原有意义 | zxcv | cv大法 | zxcv | cv大法 | 64 | | 小上 小下 小左 小右 | rino | 右手 | ikjl | 右手 | 65 | | 大上 大下 大左 大右 | dest | 左手 | edsf | 左手 | 66 | | 编辑 | e | edit | e | edit | 67 | | 新增 | l | launch | o | open | 68 | | 删, 退, 叉掉 | q/x/esc | quit, x掉 | q | quit, x掉 | 69 | | 改(大小), 搜索 | s | size,search | s | size,search | 70 | | 改(位置)/移动 | m | move | m | move | 71 | | 改(把window移动到tab) | a | arrive | a | arrive | 72 | | 复制 | y | yank | y | yank | 73 | | 查(到某些特定的位置) | g | goto | g | goto | 74 | | 查tab | t | tab | f | find tab | 75 | | 查window | w | window | w | window | 76 | | 进入鼠标模式 | p | 硬记 | n | 硬记 | 77 | | 备用的操作 | b | backup | b | backup | 78 | | 直通车 | f | fallthrough | r | retain | 79 | | 辅助上下 | ud | up down | ud | ud | 80 | | 任意键,查找按键 | . | 正则 | . | 正则 | 81 | | leader键 | , ctrl ctrl+alt alt | | | | 82 | 83 | ## 具体的接口解释 84 | 85 | [sui.md] -------------------------------------------------------------------------------- /app_websites.md: -------------------------------------------------------------------------------- 1 | # applist 2 | - [autohotkey](https://autohotkey.com) 3 | - [TouchCursor](https://github.com/martin-stone/touchcursor) 4 | - [mouseable](https://github.com/wirekang/mouseable) 5 | - [GlazeWm](https://github.com/glazerdesktop/GlazeWM) 6 | - [vscode](https://code.visualstudio.com/) 7 | - [clink](https://chrisant996.github.io/clink/) 8 | - [chromestore](https://chromewebstore.google.com/) 9 | -------------------------------------------------------------------------------- /bin/GlazeWM.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soluty/sui/e38e29d37b28214bee53e7da83ce3bf33cc1d788/bin/GlazeWM.zip -------------------------------------------------------------------------------- /bin/ScreenCapture.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soluty/sui/e38e29d37b28214bee53e7da83ce3bf33cc1d788/bin/ScreenCapture.exe -------------------------------------------------------------------------------- /bin/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | 5 | if not exist "%xdir%\GlazeWM.exe" ( 6 | "%ProgramFiles%/Git/usr/bin/unzip.exe" "%xdir%GlazeWM.zip" 7 | ) 8 | 9 | @REM if not exist "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\glazewm.lnk" ( 10 | @REM "%xdir%\nircmd.exe" shortcut "%xdir%\GlazeWM.exe" %xdir% "glazewm" 11 | @REM move "%xdir%\glazewm.lnk" "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" 12 | @REM ) 13 | -------------------------------------------------------------------------------- /bin/nircmd.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soluty/sui/e38e29d37b28214bee53e7da83ce3bf33cc1d788/bin/nircmd.exe -------------------------------------------------------------------------------- /bin/nircmdc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soluty/sui/e38e29d37b28214bee53e7da83ce3bf33cc1d788/bin/nircmdc.exe -------------------------------------------------------------------------------- /go.work: -------------------------------------------------------------------------------- 1 | go 1.19 2 | 3 | use ./sui/layoutchanger 4 | -------------------------------------------------------------------------------- /install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | 5 | set "defaultlayout=qwerty" 6 | set "layout=%~1" 7 | 8 | if "%layout%"=="" ( 9 | set "layout=%defaultlayout%" 10 | ) 11 | if "%layout%"=="norman" ( 12 | goto :continue 13 | ) 14 | if "%layout%"=="qwerty" ( 15 | goto :continue 16 | ) 17 | 18 | echo currently sui do not support layout: %layout% 19 | exit \b 20 | 21 | :continue 22 | 23 | echo your keyboard layout is: %layout% 24 | 25 | setx SUI_ROOT %xdir% 26 | 27 | if not exist "%xdir%build" ( 28 | md "%xdir%build" 29 | ) 30 | if not exist "%xdir%build\%layout%" ( 31 | md "%xdir%build\%layout%" 32 | ) 33 | echo copy src to build dir... 34 | xcopy /E /I "%xdir%src" "%xdir%build\%layout%" 35 | 36 | if %errorlevel%==0 ( 37 | goto :installsui 38 | ) else ( 39 | echo copy build dir error.. 40 | echo stop sui install!!! 41 | exit 42 | ) 43 | 44 | :installsui 45 | 46 | echo change layout to %layout%... 47 | "%xdir%sui\layoutchanger\layoutchanger.exe" -l "%layout%" 48 | 49 | echo install bin... 50 | call "%xdir%bin\install.bat" "%~1" 51 | 52 | REM exec sub dirs install.bat 53 | for /f %%i in ('dir /b /ad "%xdir%build\%layout%"') do ( 54 | if exist "%xdir%build\%layout%\%%i\install.bat" ( 55 | echo install %%i's config... 56 | call "%xdir%build\%layout%\%%i\install.bat" "%layout%" 57 | if %errorlevel%==0 ( 58 | echo install %%i ok 59 | ) 60 | ) 61 | ) 62 | pause 63 | -------------------------------------------------------------------------------- /src/autohotkey/v1/browser.ahk: -------------------------------------------------------------------------------- 1 | ; sui backup interface 2 | #If WinActive("ahk_exe chrome.exe") 3 | or WinActive("ahk_exe firefox.exe") 4 | or WinActive("ahk_exe msedge.exe") 5 | or WinActive("ahk_exe vivaldi.exe") 6 | or WinActive("ahk_exe brave.exe") 7 | ^SUI_备份:: 8 | ctrl_b_var_browser := true 9 | Sleep 1000 10 | ctrl_b_var_browser := false 11 | return 12 | #If (ctrl_b_var_browser) 13 | SUI_关闭:: 14 | ctrl_b_var_browser := false 15 | Send ^{F4} 16 | return 17 | r:: 18 | ctrl_b_var_browser := false 19 | Send ^{F5} 20 | return 21 | #If 22 | return 23 | #If 24 | -------------------------------------------------------------------------------- /src/autohotkey/v1/chrome/init.ahk: -------------------------------------------------------------------------------- 1 | ; sui backup interface 2 | #If WinActive("ahk_exe chrome.exe") 3 | ^!SUI_窗口:: 4 | ctrl_alt_w_var := true 5 | Sleep 1000 6 | ctrl_alt_w_var := false 7 | return 8 | RCtrl & SUI_窗口:: 9 | ctrl_alt_w_var := true 10 | Sleep 1000 11 | ctrl_alt_w_var := false 12 | return 13 | AppsKey & SUI_窗口:: 14 | ctrl_alt_w_var := true 15 | Sleep 1000 16 | ctrl_alt_w_var := false 17 | return 18 | !SUI_打开:: 19 | alt_l_var := true 20 | Send !SUI_打开 21 | Sleep 1000 22 | alt_l_var := false 23 | return 24 | #If 25 | 26 | #If (ctrl_alt_w_var and WinActive("ahk_exe chrome.exe")) 27 | d:: 28 | ctrl_alt_w_var := false 29 | Send ^+j 30 | return 31 | Left:: 32 | ctrl_alt_w_var := false 33 | Send !{F8} 34 | return 35 | Right:: 36 | ctrl_alt_w_var := false 37 | Send !{F9} 38 | return 39 | #If 40 | 41 | #If (alt_l_var and WinActive("ahk_exe chrome.exe")) 42 | SUI_句号:: 43 | Send ^+p 44 | return 45 | #If -------------------------------------------------------------------------------- /src/autohotkey/v1/common.ahk: -------------------------------------------------------------------------------- 1 | global SUI_CURRENT_IM := 0 2 | 3 | IME_SET(setSts, WinTitle="") 4 | { 5 | SUI_CURRENT_IM := setSts 6 | ifEqual WinTitle,, SetEnv, WinTitle, A 7 | WinGet, hWnd, ID, %WinTitle% 8 | DefaultIMEWnd := DllCall("imm32\ImmGetDefaultIMEWnd", Uint, hWnd, Uint) 9 | 10 | DetectSave := A_DetectHiddenWindows 11 | DetectHiddenWindows, ON 12 | SendMessage 0x283, 0x006, setSts,, ahk_id %DefaultIMEWnd% 13 | DetectHiddenWindows, %DetectSave% 14 | Return ErrorLevel 15 | } 16 | 17 | ; copy interface in window manager 18 | GetWindowInfo(hwnd) { 19 | WinGetTitle, title, ahk_id %hwnd% 20 | WinGetClass, class, ahk_id %hwnd% 21 | WinGet, processPath, ProcessPath, ahk_id %hwnd% 22 | WinGet, processName, ProcessName, ahk_id %hwnd% 23 | WinGetPos, x, y, width, height, ahk_id %hwnd% 24 | info = wtitle:%title%`nwclass:%class%`nwpos:%x%, %y%`nwsize:%width%x%height%`nwprocess:%processName%`nwpass:%processPath% 25 | Clipboard := info 26 | } 27 | 28 | SendHttpGet(url) { 29 | req := ComObjCreate("Msxml2.XMLHTTP") 30 | req.open("GET", url, true) 31 | req.send() 32 | ;Run, %comspec% /c xh get %url%, , Hide 33 | } 34 | 35 | 36 | ~LShift up:: 37 | if(GetKeyState(";")) { 38 | return 39 | } 40 | if (GetKeyState("CapsLock", "T")) { 41 | SetCapsLockState, Off 42 | } 43 | if (WinExist("ahk_class SoPY_Comp")){ 44 | Send {Enter} 45 | } 46 | IME_SET(0) 47 | return 48 | 49 | ~RShift:: 50 | if (GetKeyState("CapsLock", "T")) { 51 | SetCapsLockState, Off 52 | } 53 | IME_SET(1) 54 | return 55 | 56 | Contains(arr, str){ 57 | for index, value in arr { 58 | if (value = str) { 59 | return true 60 | } 61 | } 62 | return false 63 | } 64 | 65 | global SUI_WM_FALL_THROUGH := false 66 | ; sui fallthrough interface 67 | $^SUI_直通:: 68 | if(SUI_WM_FALL_THROUGH){ 69 | Send ^SUI_直通 70 | return 71 | } 72 | SUI_WM_FALL_THROUGH := true 73 | SetTimer, FallThroughTimer, -1000 74 | return 75 | FallThroughTimer: 76 | SUI_WM_FALL_THROUGH := false 77 | SetTimer, FallThroughTimer, Off 78 | return 79 | 80 | $^+SUI_直通:: 81 | SUI_WM_FALL_THROUGH := false 82 | Send ^+SUI_直通 83 | return 84 | -------------------------------------------------------------------------------- /src/autohotkey/v1/editline.ahk: -------------------------------------------------------------------------------- 1 | #Include %A_ScriptDir%\common.ahk 2 | 3 | ; common edit line interface 4 | #If WinActive("ahk_exe Explorer.EXE") 5 | or WinActive("ahk_exe notepad.exe") 6 | or WinActive("ahk_exe NotepadNext.exe") 7 | or WinActive("ahk_exe Code.exe") 8 | or WinActive("ahk_exe chrome.exe") 9 | $^SUI_行编辑:: 10 | ctrl_e_var_editline := true 11 | IME_SET(0) 12 | Sleep 500 13 | IME_SET(1) 14 | Sleep 500 15 | ctrl_e_var_editline := false 16 | return 17 | #If (ctrl_e_var_editline) 18 | Esc:: 19 | ctrl_e_var_editline := false 20 | return 21 | d:: 22 | ctrl_e_var_editline := false 23 | Send {End}+{Home}{Backspace} 24 | return 25 | SUI_小s:: 26 | ctrl_e_var_editline := false 27 | Send +{Home}{Backspace} 28 | return 29 | SUI_小f:: 30 | ctrl_e_var_editline := false 31 | Send +{End}{Backspace} 32 | return 33 | SUI_小j:: 34 | Send ^{Backspace} 35 | return 36 | SUI_小l:: 37 | Send ^{Delete} 38 | return 39 | Left:: 40 | Send ^SUI_直通^{Left}^+SUI_直通 41 | return 42 | Right:: 43 | Send ^SUI_直通^{Right}^+SUI_直通 44 | return 45 | SUI_拷贝:: 46 | ctrl_e_var_editline := false 47 | Send {End}+{Home}^c{Home} 48 | return 49 | SUI_粘贴:: 50 | ctrl_e_var_editline := false 51 | Send ^v 52 | return 53 | *SUI_撤销:: 54 | ctrl_e_var_editline := false 55 | if (GetKeyState("Shift","P")){ 56 | Send ^z 57 | return 58 | } 59 | Send ^z 60 | return 61 | #If 62 | 63 | 64 | #If WinActive("ahk_exe cmd.exe") 65 | or WinActive("ahk_exe wezterm-gui.exe") 66 | $^SUI_行编辑:: 67 | ctrl_e_var_editline_cli := true 68 | IME_SET(0) 69 | Sleep 500 70 | IME_SET(1) 71 | Sleep 500 72 | ctrl_e_var_editline_cli := false 73 | return 74 | #If (ctrl_e_var_editline_cli) 75 | $SUI_删除:: 76 | ctrl_e_var_editline_cli := false 77 | Send ^SUI_行编辑SUI_删除 78 | return 79 | SUI_行编辑:: 80 | ctrl_e_var_editline_cli := false 81 | Send ^SUI_行编辑SUI_行编辑 82 | return 83 | $*SUI_撤销:: 84 | ctrl_e_var_editline_cli := false 85 | if (GetKeyState("Shift","P")){ 86 | ; todo redo 87 | return 88 | } 89 | Send ^SUI_行编辑SUI_撤销 90 | return 91 | $SUI_小s:: 92 | ctrl_e_var_editline_cli := false 93 | Send ^SUI_行编辑SUI_小s 94 | return 95 | $SUI_小f:: 96 | ctrl_e_var_editline_cli := false 97 | Send ^SUI_行编辑SUI_小f 98 | return 99 | $*SUI_直通:: 100 | ctrl_e_var_editline_cli := false 101 | if (GetKeyState("Shift","P")){ 102 | Send ^SUI_行编辑+SUI_直通 103 | return 104 | } 105 | Send ^SUI_行编辑SUI_直通 106 | return 107 | $Left:: 108 | Send ^+[ 109 | return 110 | $Right:: 111 | Send ^+] 112 | return 113 | SUI_小j:: 114 | Send ^+SUI_小j 115 | return 116 | SUI_小l:: 117 | Send ^+SUI_小l 118 | return 119 | ~SUI_拷贝:: 120 | ; todo 121 | return 122 | ~SUI_粘贴:: 123 | ; todo 124 | return 125 | #If 126 | -------------------------------------------------------------------------------- /src/autohotkey/v1/explorer/init.ahk: -------------------------------------------------------------------------------- 1 | #If (!ctrl_w_var_sui and WinActive("ahk_exe Explorer.EXE")) 2 | !SUI_拷贝:: 3 | alt_y_var := true 4 | Sleep 1000 5 | alt_y_var := false 6 | return 7 | !SUI_小左:: ; goto sidebar 8 | Send ^f 9 | Send ^f 10 | Send ^+f 11 | Send {Tab} 12 | return 13 | !SUI_小右:: 14 | Send ^f 15 | Send ^e 16 | Send ^+f 17 | Sleep 100 18 | Send {Down} 19 | return 20 | !SUI_大小:: 21 | Send ^f 22 | Send ^f 23 | Send ^+f 24 | return 25 | !SUI_直跳:: 26 | alt_g_var := true 27 | Sleep 1000 28 | alt_g_var := false 29 | return 30 | !SUI_打开:: 31 | alt_l_var := true 32 | Sleep 1000 33 | alt_l_var := false 34 | return 35 | !SUI_小上:: 36 | Send !{Up} 37 | return 38 | !SUI_小下:: 39 | Send {Enter} 40 | return 41 | #IfWinActive 42 | 43 | #If (alt_l_var and WinActive("ahk_exe Explorer.EXE")) 44 | f:: ; new file 45 | alt_l_var := false 46 | Send !h 47 | Sleep 50 48 | Send w 49 | Sleep 50 50 | Send t 51 | return 52 | d:: ; new dir 53 | alt_l_var := false 54 | Send ^+n 55 | return 56 | #If 57 | 58 | #If (alt_g_var and WinActive("ahk_exe Explorer.EXE")) 59 | SUI_小左:: 60 | alt_g_var := false 61 | Send !{Left} 62 | return 63 | SUI_小右:: 64 | alt_g_var := false 65 | Send !{Right} 66 | return 67 | SUI_句号:: 68 | alt_g_var := false 69 | Send !{d}!{Down} 70 | return 71 | #If 72 | 73 | #If (alt_y_var and WinActive("ahk_exe Explorer.EXE")) 74 | n:: 75 | alt_y_var := false 76 | Send {F2} 77 | Sleep 100 78 | Send ^c{Esc} 79 | return 80 | p:: 81 | alt_y_var := false 82 | Send !h 83 | Sleep 100 84 | Send cp 85 | return 86 | #If 87 | -------------------------------------------------------------------------------- /src/autohotkey/v1/explorer/readme.md: -------------------------------------------------------------------------------- 1 | 由于没找到怎么自动修改快捷键, 所以插入一个网页的链接教程 2 | [如何可以修改到用快捷键新建文本文档](https://www.cnblogs.com/olin25/p/17574882.html) 3 | -------------------------------------------------------------------------------- /src/autohotkey/v1/glazewm/init.ahk: -------------------------------------------------------------------------------- 1 | ;fallthrough 2 | $^Left:: 3 | if(SUI_WM_FALL_THROUGH){ 4 | Send ^Left 5 | return 6 | } 7 | Send ^{F3} 8 | return 9 | $^Right:: 10 | if(SUI_WM_FALL_THROUGH){ 11 | Send ^Right 12 | return 13 | } 14 | Send ^{F2} 15 | return 16 | 17 | ; launch interface 18 | $^SUI_打开:: 19 | ctrl_l_var := true 20 | im_current := SUI_CURRENT_IM 21 | IME_SET(0) 22 | Sleep 500 23 | IME_SET(im_current) 24 | Sleep 500 25 | ctrl_l_var := false 26 | return 27 | #If (ctrl_l_var) 28 | SUI_打开:: 29 | ctrl_l_var := false 30 | Send ^SUI_打开SUI_打开 31 | return 32 | ^SUI_打开:: 33 | ctrl_l_var := false 34 | Send ^SUI_打开SUI_打开 35 | return 36 | v:: 37 | ctrl_l_var := false 38 | Send ^SUI_打开v 39 | return 40 | h:: 41 | ctrl_l_var := false 42 | Send ^SUI_打开h 43 | return 44 | f:: 45 | ctrl_l_var := false 46 | Send ^SUI_打开f 47 | return 48 | w:: 49 | ctrl_l_var := false 50 | Send ^SUI_打开w 51 | return 52 | r:: 53 | ctrl_l_var := false 54 | Send ^SUI_打开r 55 | return 56 | c:: 57 | ctrl_l_var := false 58 | Send ^SUI_打开c 59 | return 60 | n:: 61 | ctrl_l_var := false 62 | ctrl_ln_var := true 63 | return 64 | #If 65 | #If ctrl_ln_var 66 | c:: 67 | ctrl_ln_var := false 68 | Run, cmd.exe 69 | return 70 | #If 71 | 72 | ; quit interface 73 | $^SUI_关闭:: 74 | ctrl_q_var := true 75 | Sleep 1000 76 | ctrl_q_var := false 77 | return 78 | #If (ctrl_q_var) 79 | .:: 80 | ctrl_q_var := false 81 | RunWait, "%HOME%\AppData\Local\Programs\utools\uTools.exe" 82 | Send kill{Space}{Space} 83 | return 84 | o:: 85 | ctrl_q_var := false 86 | Run, python "%SUI_ROOT%\sui\not_implement.py" 87 | return 88 | n:: 89 | ctrl_q_var := false 90 | Run, python "%SUI_ROOT%\sui\not_implement.py" 91 | return 92 | SUI_关闭:: 93 | ctrl_q_var := false 94 | if WinActive("ahk_exe SnippingTool.exe") 95 | || WinActive("ahk_exe ScreenToGif.exe") 96 | { 97 | Send !{F4} 98 | return 99 | } 100 | Send ^SUI_关闭SUI_关闭 101 | return 102 | ^SUI_关闭:: 103 | ctrl_q_var := false 104 | Send ^SUI_关闭SUI_关闭 105 | return 106 | SUI_标签:: 107 | ctrl_q_var := false 108 | Send ^SUI_关闭SUI_标签 109 | return 110 | SUI_窗口:: 111 | ctrl_q_var := false 112 | Send ^SUI_关闭SUI_窗口 113 | return 114 | a:: 115 | ctrl_q_var := false 116 | Send ^SUI_关闭a 117 | return 118 | return 119 | #If 120 | 121 | ; use in glazewm window manager, if your manager is komorebi, uncommont this 122 | ^Up:: 123 | Send ^k 124 | Send ^{F3} 125 | Send ^{F2} 126 | return 127 | ^Down:: 128 | Send ^k 129 | Send ^{F3} 130 | Send ^{F2} 131 | return 132 | ; size interface 133 | $^s:: 134 | ctrl_s_var := true 135 | Sleep 1000 136 | ctrl_s_var := false 137 | return 138 | #If (ctrl_s_var) 139 | m:: 140 | ctrl_s_var := false 141 | Send ^sm 142 | return 143 | z:: 144 | ctrl_s_var := false 145 | Send ^sz 146 | return 147 | r:: 148 | ctrl_s_var := false 149 | Send ^sr 150 | return 151 | i:: 152 | ctrl_s_var := false 153 | Send ^si 154 | return 155 | n:: 156 | ctrl_s_var := false 157 | Send ^sn 158 | return 159 | o:: 160 | ctrl_s_var := false 161 | Send ^so 162 | return 163 | h:: 164 | ctrl_s_var := false 165 | Send ^sh 166 | return 167 | u:: 168 | SoundGet, currentVolume 169 | newVolume := currentVolume + 5 170 | SoundSet, %newVolume% 171 | return 172 | d:: 173 | SoundGet, currentVolume 174 | newVolume := currentVolume - 5 175 | SoundSet, %newVolume% 176 | return 177 | s:: 178 | ctrl_s_var := false 179 | SoundSet, 50 180 | return 181 | #If 182 | 183 | ; tabto interface 184 | ^t:: 185 | if (SUI_WM_FALL_THROUGH) { 186 | ToolTip fallthrough.. 187 | Send ^t 188 | return 189 | } 190 | IME_SET(0) 191 | ctrl_t_var_glaezwm := true 192 | Sleep 1000 193 | return 194 | #If (ctrl_t_var_glaezwm) 195 | e:: 196 | ctrl_t_var_glaezwm := false 197 | Send ^t 198 | Send e 199 | return 200 | b:: 201 | ctrl_t_var_glaezwm := false 202 | Send ^t 203 | Send b 204 | return 205 | t:: 206 | ctrl_t_var_glaezwm := false 207 | Send ^t 208 | Send t 209 | return 210 | d:: 211 | ctrl_t_var_glaezwm := false 212 | Send ^t 213 | Send d 214 | return 215 | i:: 216 | ctrl_t_var_glaezwm := false 217 | Send ^t 218 | Send i 219 | return 220 | #If 221 | -------------------------------------------------------------------------------- /src/autohotkey/v1/komorebi/init.ahk: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/autohotkey/v1/sui.ahk: -------------------------------------------------------------------------------- 1 | #SingleInstance Force 2 | EnvGet, HOME, USERPROFILE 3 | EnvGet, SUI_ROOT, SUI_ROOT 4 | EnvGet, SystemRoot, SystemRoot 5 | EnvGet, SUI_MODULES, SUI_MODULES 6 | EnvGet, SUI_WM, SUI_WM 7 | ToolTip reload sui ok... 8 | Sleep 500 9 | ToolTip 10 | 11 | #Include %A_ScriptDir%\common.ahk 12 | #Include %A_ScriptDir%\editline.ahk 13 | 14 | if (SUI_WM="komorebi") { 15 | #Include %A_ScriptDir%\komorebi\init.ahk 16 | } else { 17 | #Include %A_ScriptDir%\glazewm\init.ahk 18 | } 19 | 20 | if (SUI_MODULES="" || Contains(SUI_MODULES, "browser")) { 21 | #Include %A_ScriptDir%\browser.ahk 22 | } 23 | if (SUI_MODULES="" || Contains(SUI_MODULES, "vscode")) { 24 | #Include %A_ScriptDir%\vscode\init.ahk 25 | } 26 | if (SUI_MODULES="" || Contains(SUI_MODULES, "wezterm")) { 27 | #Include %A_ScriptDir%\wezterm\init.ahk 28 | } 29 | if (SUI_MODULES="" || Contains(SUI_MODULES, "explorer")) { 30 | #Include %A_ScriptDir%\explorer\init.ahk 31 | } 32 | if (SUI_MODULES="" || Contains(SUI_MODULES, "chrome")) { 33 | #Include %A_ScriptDir%\chrome\init.ahk 34 | } 35 | 36 | ; CapsLock map to Esc/Alt 37 | *CapsLock:: 38 | if (WinExist("ahk_class SoPY_Comp")){ 39 | Send {Enter} 40 | } 41 | vimApps := ["goland64.exe","Code.exe","idea.exe","cmd.exe","wezterm-gui.exe","obsidian.exe"] 42 | for k,app in vimApps { 43 | if WinActive("ahk_exe " . app){ 44 | SendInput {Blind}{Esc Down}{Esc Up} 45 | IME_SET(0) 46 | SendInput {Blind}{Esc Down}{Esc Up} 47 | return 48 | } 49 | } 50 | 51 | sbApps := ["Wechat.exe","WXWork.exe","QQ.exe"] 52 | for k,app in sbApps { 53 | if WinActive("ahk_exe " . app) { 54 | WinActivate, ahk_class Shell_TrayWnd 55 | return 56 | } 57 | } 58 | SendInput {Blind}{Esc Down}{Esc Up} 59 | return 60 | CapsLock & a::Send !a 61 | CapsLock & b::Send !b 62 | CapsLock & c::Send !c 63 | CapsLock & d::Send !d 64 | CapsLock & e::Send !e 65 | CapsLock & f::Send !f 66 | CapsLock & g::Send !g 67 | CapsLock & h::Send !h 68 | CapsLock & i::Send !i 69 | CapsLock & j::Send !j 70 | CapsLock & k::Send !k 71 | CapsLock & l::Send !l 72 | CapsLock & m::Send !m 73 | CapsLock & n::Send !n 74 | CapsLock & o::Send !o 75 | CapsLock & p::Send !p 76 | CapsLock & q::Send !q 77 | CapsLock & r::Send !r 78 | CapsLock & s::Send !s 79 | CapsLock & t::Send !t 80 | CapsLock & u::Send !u 81 | CapsLock & v::Send !v 82 | CapsLock & w::Send !w 83 | CapsLock & x::Send !x 84 | CapsLock & y::Send !y 85 | CapsLock & z::Send !z 86 | CapsLock & ,::Send !, 87 | CapsLock & .::Send !. 88 | CapsLock & Left::Send !{Left} 89 | CapsLock & Right::Send !{Right} 90 | CapsLock & Up::Send !{Up} 91 | CapsLock & Down::Send !{Down} 92 | CapsLock & PgUp::Send !{PgUp} 93 | CapsLock & PgDn::Send !{PgDn} 94 | CapsLock & Home::Send !{Home} 95 | CapsLock & End::Send !{End} 96 | 97 | #If !WinActive("ahk_exe wezterm-gui.exe") 98 | and !WinActive("ahk_exe Code.exe") 99 | RCtrl & a::Send ^!a 100 | RCtrl & b::Send ^!b 101 | RCtrl & c::Send ^!c 102 | RCtrl & d::Send ^!d 103 | RCtrl & e::Send ^!e 104 | RCtrl & f::Send ^!f 105 | RCtrl & g::Send ^!g 106 | RCtrl & h::Send ^!h 107 | RCtrl & i::Send ^!i 108 | RCtrl & j::Send ^!j 109 | RCtrl & k::Send ^!k 110 | RCtrl & l::Send ^!l 111 | RCtrl & m::Send ^!m 112 | RCtrl & n::Send ^!n 113 | RCtrl & o::Send ^!o 114 | RCtrl & p::Send ^!p 115 | RCtrl & q::Send ^!q 116 | RCtrl & r::Send ^!r 117 | RCtrl & s::Send ^!s 118 | RCtrl & t::Send ^!t 119 | RCtrl & u::Send ^!u 120 | RCtrl & v::Send ^!v 121 | RCtrl & w::Send ^!w 122 | RCtrl & x::Send ^!x 123 | RCtrl & y::Send ^!y 124 | RCtrl & z::Send ^!z 125 | RCtrl & ,::Send ^!, 126 | RCtrl & .::Send ^!. 127 | RCtrl & Left::Send ^!{Left} 128 | RCtrl & Right::Send ^!{Right} 129 | RCtrl & Up::Send ^!{Up} 130 | RCtrl & Down::Send ^!{Down} 131 | RCtrl & PgUp::Send ^!{PgUp} 132 | RCtrl & PgDn::Send ^!{PgDn} 133 | RCtrl & Home::Send ^!{Home} 134 | RCtrl & End::Send ^!{End} 135 | 136 | AppsKey & a::Send ^!a 137 | AppsKey & b::Send ^!b 138 | AppsKey & c::Send ^!c 139 | AppsKey & d::Send ^!d 140 | AppsKey & e::Send ^!e 141 | AppsKey & f::Send ^!f 142 | AppsKey & g::Send ^!g 143 | AppsKey & h::Send ^!h 144 | AppsKey & i::Send ^!i 145 | AppsKey & j::Send ^!j 146 | AppsKey & k::Send ^!k 147 | AppsKey & l::Send ^!j 148 | AppsKey & m::Send ^!m 149 | AppsKey & n::Send ^!n 150 | AppsKey & o::Send ^!o 151 | AppsKey & p::Send ^!p 152 | AppsKey & q::Send #q 153 | AppsKey & r::Send ^!r 154 | AppsKey & s::Send ^!s 155 | AppsKey & t::Send ^!t 156 | AppsKey & u::Send ^!u 157 | AppsKey & v::Send ^!v 158 | AppsKey & w::Send ^!w 159 | AppsKey & x::Send ^!x 160 | AppsKey & y::Send ^!y 161 | AppsKey & z::Send ^!z 162 | AppsKey & ,::Send ^!, 163 | AppsKey & .::Send ^!. 164 | AppsKey & Left::Send ^!{Left} 165 | AppsKey & Right::Send ^!{Right} 166 | AppsKey & Up::Send ^!{Up} 167 | AppsKey & Down::Send ^!{Down} 168 | AppsKey & PgUp::Send ^!{PgUp} 169 | AppsKey & PgDn::Send ^!{PgDn} 170 | AppsKey & Home::Send ^!{Home} 171 | AppsKey & End::Send ^!{End} 172 | #IfWinNotActive 173 | 174 | ; interface mouse use mouseable 175 | $^SUI_鼠标:: 176 | if (SUI_WM_FALL_THROUGH) { 177 | Send ^SUI_鼠标 178 | return 179 | } 180 | WinGetActiveStats, Title, Width, Height, X, Y 181 | CoordMode, Mouse, Screen 182 | MouseGetPos mx, my 183 | 184 | if (mx > X and mx Y and my < Y+Height) { 185 | Sleep 200 186 | Send ^{F1} 187 | return 188 | } 189 | IfWinExist, %Title% 190 | { 191 | SetMouseDelay, 0 192 | MouseMove, (X+Width/2), (Y+Height/2) 193 | SetMouseDelay, -1 194 | Sleep 200 195 | Send ^{F1} 196 | } 197 | else 198 | { 199 | Sleep 200 200 | Send ^{F1} 201 | } 202 | return 203 | 204 | ^SUI_句号:: 205 | ctrl_dot_var := true 206 | Sleep 1000 207 | ctrl_dot_var := false 208 | return 209 | #If (ctrl_dot_var) 210 | SUI_句号:: 211 | ctrl_dot_var := false 212 | Reload 213 | return 214 | #If 215 | 216 | ; copy paste interface 217 | ^SUI_拷贝:: 218 | ctrl_y_var := true 219 | Sleep 1000 220 | ctrl_y_var := false 221 | return 222 | #If (ctrl_y_var) 223 | SUI_拷贝:: 224 | ctrl_y_var := false 225 | Run "%SUI_ROOT%\sui\bin\ScreenCapture.exe" 226 | return 227 | a:: 228 | ctrl_y_var := false 229 | Run, "%SystemRoot%\system32\SnippingTool.exe" 230 | Sleep 500 231 | Send !ms 232 | return 233 | r:: 234 | ctrl_y_var := false 235 | Run, "%SystemRoot%\system32\SnippingTool.exe" 236 | Sleep 500 237 | Send !m 238 | return 239 | .:: 240 | ctrl_y_var := false 241 | Run, "%SystemRoot%\system32\SnippingTool.exe" 242 | Sleep 500 243 | Send !mf 244 | return 245 | w:: 246 | ctrl_y_var := false 247 | Run, "%SystemRoot%\system32\SnippingTool.exe" 248 | Sleep 500 249 | Send !mw 250 | return 251 | *n:: 252 | ctrl_y_var := false 253 | if (GetKeyState("Shift","P")){ 254 | WinGet, processPath, ProcessPath, ahk_id %hwnd% 255 | Clipboard := processPath 256 | return 257 | } 258 | WinGet, processNamew, ProcessName, A 259 | Clipboard := processNamew 260 | return 261 | i:: 262 | ctrl_y_var := false 263 | WinGetActiveTitle, activeTitle 264 | WinGet, activeHwnd, ID, %activeTitle% 265 | GetWindowInfo(activeHwnd) 266 | return 267 | g:: ; neep ScreenToGif run in daemon and set start shortcut 268 | ctrl_y_var := false 269 | Send, ^{F12} 270 | return 271 | v:: 272 | ToolTip start record.. 273 | ctrl_y_var := false 274 | ; need obs to record video 275 | if WinExist("ahk_exe obs64.exe") 276 | { 277 | WinGet, obsWindow, ID, ahk_exe obs64.exe 278 | if (obsWindow) 279 | { 280 | screen_recording := true 281 | obs_window_hd := obsWindow 282 | ; todo make it more common 283 | ;WinGetActiveTitle, currentWindow 284 | ; Run, komorebic focus-named-workspace rss 285 | Send, ^td ; to obs workspace 286 | WinGet, currentWindow, ID, A 287 | WinActivate, ahk_id %obsWindow% 288 | WinWaitActive, ahk_id %obsWindow% 289 | Send, ^{F4} 290 | Send, ^te ; to editor workspace 291 | ;Run, komorebic focus-named-workspace editor 292 | ;WinActivate, ahk_id %currentWindow% 293 | ;WinWaitActive, ahk_id %currentWindow% 294 | }else{ 295 | ToolTip no obs window.. 296 | } 297 | } 298 | return 299 | SUI_粘贴:: 300 | ctrl_y_var := false 301 | ctrl_yp_var := true 302 | return 303 | #If 304 | #If ctrl_yp_var 305 | t:: ; neet pot run in daemon 306 | ctrl_yp_var := false 307 | SendHttpGet("http://127.0.0.1:60828/ocr_recognize?screenshot=true") 308 | return 309 | #If 310 | 311 | #IfWinActive, ahk_exe obs64.exe 312 | s:: 313 | if(screen_recording){ 314 | screen_recording := false 315 | ToolTip 316 | Send, ^{F5} 317 | return 318 | } 319 | return 320 | p:: 321 | if(screen_recording){ 322 | ToolTip obs_is_pause.. 323 | Send, ^{F6} 324 | return 325 | } 326 | return 327 | r:: 328 | if(screen_recording){ 329 | ToolTip obs_is_recording.. 330 | Send, ^{F7} 331 | Sleep 1000 332 | ToolTip 333 | return 334 | } 335 | return 336 | #IfWinActive 337 | 338 | 339 | ; find window interface 340 | ^SUI_窗口:: 341 | if (SUI_WM_FALL_THROUGH) { 342 | Send ^SUI_窗口 343 | return 344 | } 345 | ctrl_w_var_sui := true 346 | return 347 | #If (ctrl_w_var_sui) 348 | !SUI_小i:: 349 | Send {Up} 350 | return 351 | !SUI_小k:: 352 | Send {Down} 353 | return 354 | !SUI_小j:: 355 | Send {Left} 356 | return 357 | !SUI_小l:: 358 | Send {Right} 359 | return 360 | SUI_句号:: 361 | Send {Alt Down}{Tab Down} 362 | return 363 | !Esc:: 364 | ctrl_w_var_sui := false 365 | Send {Tab Up}{Alt Up} 366 | return 367 | !CapsLock:: 368 | ctrl_w_var_sui := false 369 | Send {Tab Up}{Alt Up} 370 | return 371 | !Enter:: 372 | ctrl_w_var_sui := false 373 | Send {Tab Up}{Alt Up} 374 | return 375 | Esc:: 376 | ctrl_w_var_sui := false 377 | Send {Tab Up}{Alt Up} 378 | return 379 | CapsLock:: 380 | ctrl_w_var_sui := false 381 | Send {Tab Up}{Alt Up} 382 | return 383 | Enter:: 384 | ctrl_w_var_sui := false 385 | Send {Tab Up}{Alt Up} 386 | return 387 | #If 388 | 389 | -------------------------------------------------------------------------------- /src/autohotkey/v1/vscode/init.ahk: -------------------------------------------------------------------------------- 1 | ; backup interface 2 | #IfWinActive, ahk_exe Code.exe 3 | ^SUI_备份:: 4 | ctrl_b_var := true 5 | Sleep 1000 6 | ctrl_b_var := false 7 | return 8 | $!SUI_选择模式:: 9 | if(alt_v_var){ 10 | Send !SUI_选择模式 11 | return 12 | } 13 | 14 | alt_v_var := true 15 | alt_vs_var := false 16 | ;Send !+v 17 | return 18 | 19 | RCtrl::Alt 20 | AppsKey::Alt 21 | 22 | !*SUI_大小:: 23 | if (GetKeyState("Shift","P")){ 24 | alt_s_var := true 25 | return 26 | } 27 | alt_s_var := false 28 | ;alt_xiaos_var := true 29 | Send !SUI_大小 30 | return 31 | #IfWinActive 32 | 33 | #If (alt_s_var and WinActive("ahk_exe Code.exe")) 34 | ~Esc:: 35 | Send {Left} 36 | alt_s_var := false 37 | return 38 | ~CapsLock:: 39 | Send {Left} 40 | alt_s_var := false 41 | return 42 | SUI_小上:: 43 | Send !+SUI_大小SUI_小上 44 | return 45 | SUI_小下:: 46 | Send !+SUI_大小SUI_小下 47 | return 48 | SUI_小左:: 49 | Send !+SUI_大小SUI_小左 50 | return 51 | SUI_小右:: 52 | Send !+SUI_大小SUI_小右 53 | return 54 | u:: 55 | Send !+SUI_大小u 56 | return 57 | d:: 58 | Send !+SUI_大小d 59 | return 60 | s:: 61 | Send !+SUI_大小s 62 | return 63 | m:: 64 | alt_s_var := false 65 | Send !+SUI_大小m 66 | return 67 | z:: 68 | alt_s_var := false 69 | Send !+SUI_大小z 70 | return 71 | #If 72 | 73 | #If (alt_xiaos_var and WinActive("ahk_exe Code.exe")) 74 | ; if you need small s to resize, use this as bootstrap 75 | n:: 76 | Send n 77 | return 78 | #If 79 | 80 | 81 | #if (ctrl_b_var and winactive("ahk_exe code.exe")) 82 | .:: 83 | ctrl_b_var := false 84 | send ^+p 85 | return 86 | #if 87 | 88 | #if (alt_v_var and winactive("ahk_exe code.exe")) 89 | esc:: 90 | Send {left} 91 | alt_v_var := false 92 | alt_vs_var := false 93 | CapsLock:: 94 | Send {left} 95 | alt_v_var := false 96 | alt_vs_var := false 97 | return 98 | PgUp:: 99 | send +{PgUp} 100 | return 101 | PgDn:: 102 | send +{PgDn} 103 | return 104 | Home:: 105 | send +{Home} 106 | return 107 | End:: 108 | send +{End} 109 | return 110 | up:: 111 | send +{up} 112 | return 113 | down:: 114 | send +{down} 115 | return 116 | left:: 117 | send +{left} 118 | return 119 | right:: 120 | send +{right} 121 | return 122 | *SUI_窗口:: 123 | ; alt_v_var := false 124 | if (GetKeyState("Shift","P")){ 125 | send !SUI_选择模式+SUI_窗口 126 | return 127 | } 128 | send !SUI_选择模式SUI_窗口 129 | return 130 | SUI_对象外部:: 131 | if(!alt_vs_var){ 132 | alt_v_var := false 133 | send !SUI_选择模式SUI_对象外部 134 | } else { 135 | Send SUI_对象外部 136 | } 137 | return 138 | SUI_对象内部:: 139 | if(!alt_vs_var){ 140 | alt_v_var := false 141 | send !SUI_选择模式SUI_对象内部 142 | } else { 143 | Send SUI_对象内部 144 | } 145 | return 146 | SUI_小左:: 147 | if(!alt_vs_var){ 148 | alt_v_var := false 149 | send !SUI_选择模式SUI_小左 150 | } else { 151 | Send SUI_小左 152 | } 153 | return 154 | SUI_小右:: 155 | if(!alt_vs_var){ 156 | alt_v_var := false 157 | send !SUI_选择模式SUI_小右 158 | } else { 159 | Send SUI_小右 160 | } 161 | return 162 | SUI_粘贴:: 163 | if(!alt_vs_var){ 164 | ; alt_v_var := false 165 | send !SUI_选择模式SUI_粘贴 166 | } else { 167 | Send SUI_粘贴 168 | } 169 | return 170 | SUI_打开:: 171 | if(!alt_vs_var){ 172 | ; alt_v_var := false 173 | send !SUI_选择模式SUI_打开 174 | } else { 175 | Send SUI_打开 176 | } 177 | return 178 | SUI_备份:: 179 | if(!alt_vs_var){ 180 | ; alt_v_var := false 181 | send !SUI_选择模式SUI_备份 182 | } else { 183 | Send SUI_备份 184 | } 185 | return 186 | SUI_关闭:: 187 | if(!alt_vs_var){ 188 | ; alt_v_var := false 189 | send !SUI_选择模式SUI_关闭 190 | } else { 191 | Send SUI_关闭 192 | } 193 | return 194 | e:: 195 | if(!alt_vs_var){ 196 | ; alt_v_var := false 197 | send !SUI_选择模式e 198 | } else { 199 | Send e 200 | } 201 | return 202 | SUI_对象两边:: 203 | if(!alt_vs_var){ 204 | alt_v_var := false 205 | send !SUI_选择模式SUI_对象两边 206 | } else { 207 | Send SUI_对象两边 208 | } 209 | return 210 | SUI_选择模式:: 211 | if(!alt_vs_var){ 212 | send !+SUI_选择模式 213 | } else { 214 | Send SUI_选择模式 215 | } 216 | return 217 | SUI_大小:: 218 | alt_vs_var := true 219 | send !SUI_选择模式SUI_大小 220 | return 221 | !SUI_拷贝:: 222 | alt_v_var := false 223 | send !SUI_拷贝 224 | return 225 | !SUI_移动:: 226 | alt_v_var := false 227 | send !SUI_移动 228 | return 229 | !SUI_大小:: 230 | alt_v_var := false 231 | send !SUI_大小 232 | return 233 | #if 234 | -------------------------------------------------------------------------------- /src/autohotkey/v1/vscode/viewcontainer_focus_down.ahk: -------------------------------------------------------------------------------- 1 | Send {Esc}{Esc}{Esc}{Esc} 2 | Send +{Tab} 3 | Send +{Tab} 4 | Send {Down}{Right}{Tab}{Tab} 5 | -------------------------------------------------------------------------------- /src/autohotkey/v1/vscode/viewcontainer_focus_up.ahk: -------------------------------------------------------------------------------- 1 | Send {Esc}{Esc}{Esc}{Esc} 2 | Send +{Tab} 3 | Send +{Tab} 4 | Send {Up}{Right}{Tab}{Tab} 5 | -------------------------------------------------------------------------------- /src/autohotkey/v1/wezterm/init.ahk: -------------------------------------------------------------------------------- 1 | 2 | #IfWinActive ahk_exe wezterm-gui.exe 3 | ^z:: 4 | ToolTip dont press ctrl+z.. use zellij to multiplex your job. 5 | Sleep 1000 6 | ToolTip 7 | return 8 | 9 | RCtrl & a::Send ^!a 10 | RCtrl & b::Send ^!b 11 | RCtrl & c::Send ^!c 12 | RCtrl & d::Send ^!d 13 | RCtrl & e::Send ^!e 14 | RCtrl & f::Send ^!f 15 | RCtrl & g::Send ^!g 16 | RCtrl & h::Send ^!h 17 | RCtrl & i::Send ^!i 18 | RCtrl & j::Send ^!j 19 | RCtrl & k::Send ^!k 20 | RCtrl & l::Send ^!j 21 | RCtrl & m::Send ^!m 22 | RCtrl & n::Send ^!n 23 | RCtrl & o::Send ^!o 24 | RCtrl & p::Send ^!p 25 | RCtrl & q::Send #q 26 | RCtrl & r::Send ^!r 27 | RCtrl & s::Send ^!s 28 | RCtrl & t::Send ^!t 29 | RCtrl & u::Send ^!u 30 | RCtrl & v::Send ^!v 31 | RCtrl & w::Send ^!w 32 | RCtrl & x::Send ^!x 33 | RCtrl & y::Send ^!y 34 | RCtrl & z::Send ^!z 35 | RCtrl & ,::Send ^!, 36 | RCtrl & .::Send ^!. 37 | RCtrl & Left::Send ^!{Left} 38 | RCtrl & Right::Send ^!{Right} 39 | RCtrl & Up::Send ^!{Up} 40 | RCtrl & Down::Send ^!{Down} 41 | RCtrl & PgUp::Send ^!{PgUp} 42 | RCtrl & PgDn::Send ^!{PgDn} 43 | RCtrl & Home::Send ^!{Home} 44 | RCtrl & End::Send ^!{End} 45 | 46 | AppsKey & a::Send ^!a 47 | AppsKey & b::Send ^!b 48 | AppsKey & c::Send ^!c 49 | AppsKey & d::Send ^!d 50 | AppsKey & e::Send ^!e 51 | AppsKey & f::Send ^!f 52 | AppsKey & g::Send ^!g 53 | AppsKey & h::Send ^!h 54 | AppsKey & i::Send ^!i 55 | AppsKey & j::Send ^!j 56 | AppsKey & k::Send ^!k 57 | AppsKey & l::Send ^!j 58 | AppsKey & m::Send ^!m 59 | AppsKey & n::Send ^!n 60 | AppsKey & o::Send ^!o 61 | AppsKey & p::Send ^!p 62 | AppsKey & q::Send #q 63 | AppsKey & r::Send ^!r 64 | AppsKey & s::Send ^!s 65 | AppsKey & t::Send ^!t 66 | AppsKey & u::Send ^!u 67 | AppsKey & v::Send ^!v 68 | AppsKey & w::Send ^!w 69 | AppsKey & x::Send ^!x 70 | AppsKey & y::Send ^!y 71 | AppsKey & z::Send ^!z 72 | AppsKey & ,::Send ^!, 73 | AppsKey & .::Send ^!. 74 | AppsKey & Left::Send ^!{Left} 75 | AppsKey & Right::Send ^!{Right} 76 | AppsKey & Up::Send ^!{Up} 77 | AppsKey & Down::Send ^!{Down} 78 | AppsKey & PgUp::Send ^!{PgUp} 79 | AppsKey & PgDn::Send ^!{PgDn} 80 | AppsKey & Home::Send ^!{Home} 81 | AppsKey & End::Send ^!{End} 82 | 83 | #IfWinActive 84 | -------------------------------------------------------------------------------- /src/glazewm/config.yaml: -------------------------------------------------------------------------------- 1 | gaps: 2 | inner_gap: 10 3 | outer_gap: 10 4 | general: 5 | show_floating_on_top: false 6 | cursor_follows_focus: false 7 | floating_window_move_amount: "100px" 8 | bar: 9 | height: "20px" 10 | position: "top" 11 | opacity: 1.0 12 | background: "#20242cc4" 13 | foreground: "#ffffff" 14 | font_family: "Segoe UI" 15 | font_size: "13px" 16 | padding: "0px 6px" 17 | components_left: 18 | - type: "workspaces" 19 | focused_workspace_background: "#ffffff33" 20 | displayed_workspace_background: "#00000033" 21 | default_workspace_background: "transparent" 22 | components_right: 23 | - type: "tiling direction" 24 | background: "#ffffff33" 25 | margin: "0 4px" 26 | padding: "0 8px" 27 | - type: "binding mode" 28 | background: "#ffffff33" 29 | margin: "0 4px 0 0" 30 | padding: "0 8px" 31 | - type: "clock" 32 | time_formatting: "hh:mm tt ddd MMM d" 33 | margin: "0 0 0 10px" 34 | workspaces: 35 | - name: "editor" 36 | keep_alive: true 37 | - name: "browser" 38 | keep_alive: true 39 | - name: "im" 40 | keep_alive: true 41 | - name: "terminal" 42 | keep_alive: true 43 | - name: "doc" 44 | keep_alive: true 45 | 46 | window_rules: 47 | - command: "move to workspace browser" 48 | match_process_name: "chrome" 49 | - command: "move to workspace editor" 50 | match_process_name: "wezterm-gui" 51 | - command: "set floating" 52 | match_class_name: "#32770" 53 | 54 | binding_modes: 55 | - name: "launch" 56 | keybindings: 57 | - command: "binding mode none" 58 | bindings: ["Escape"] 59 | - command: "binding mode none" 60 | bindings: ["Control+OemOpenBrackets"] 61 | - commands: ["exec cmd.exe", "binding mode none"] 62 | bindings: ["SUI_S打开"] 63 | - commands: ["exec cmd.exe", "binding mode none"] 64 | bindings: ["Control+L"] 65 | - commands: ["exec %USERPROFILE%/AppData/Local/Programs/utools/uTools.exe", "binding mode none"] 66 | bindings: ["W"] 67 | - commands: ["exec %USERPROFILE%/AppData/Local/Programs/utools/uTools.exe", "binding mode none"] 68 | bindings: ["F"] 69 | - commands: ["tiling direction horizontal", "binding mode none", "exec %USERPROFILE%/AppData/Local/Programs/utools/uTools.exe"] 70 | bindings: ["V"] 71 | - commands: ["tiling direction vertical", "binding mode none", "exec %USERPROFILE%/AppData/Local/Programs/utools/uTools.exe"] 72 | bindings: ["H"] 73 | - commands: ["reload config", "binding mode none"] 74 | binding: "R" 75 | - commands: ["reload config", "binding mode none"] 76 | binding: "C" 77 | - commands: ["exec cmd.exe", "binding mode none"] 78 | binding: "Alt+C" 79 | - name: "quit" 80 | keybindings: 81 | - command: "binding mode none" 82 | bindings: ["Escape"] 83 | - command: "binding mode none" 84 | bindings: ["Control+OemOpenBrackets"] 85 | - commands: ["close", "binding mode none"] 86 | binding: "SUI_S关闭" 87 | - commands: ["close", "binding mode none"] 88 | binding: "SUI_S标签" 89 | - commands: ["close", "binding mode none"] 90 | binding: "SUI_S窗口" 91 | - commands: ["exit wm"] 92 | binding: "A" 93 | - name: "goto" 94 | keybindings: 95 | - command: "binding mode none" 96 | bindings: ["Escape"] 97 | - command: "binding mode none" 98 | bindings: ["Control+OemOpenBrackets"] 99 | - commands: ["exec cmd.exe", "binding mode none"] 100 | binding: "T" 101 | - name: "size" 102 | keybindings: 103 | - command: "binding mode none" 104 | bindings: ["Escape"] 105 | - command: "binding mode none" 106 | bindings: ["Control+OemOpenBrackets"] 107 | - command: "resize height +2%" 108 | bindings: ["SUI_S小上", "Up"] 109 | - command: "resize height -2%" 110 | bindings: ["SUI_S小下", "Down"] 111 | - command: "resize width -2%" 112 | bindings: ["SUI_S小左", "Left"] 113 | - command: "resize width +2%" 114 | bindings: ["SUI_S小右", "Right"] 115 | - commands: ["toggle maximized", "binding mode none"] 116 | bindings: ["M"] 117 | - commands: ["toggle maximized", "binding mode none"] 118 | bindings: ["Z"] 119 | - commands: ["set minimized", "binding mode none"] 120 | bindings: ["H"] 121 | - commands: ["binding mode none", "exec python %SUI_ROOT%/sui/not_implement.py"] 122 | bindings: ["W"] 123 | - commands: ["binding mode none"] 124 | bindings: ["T"] 125 | - name: "move" 126 | keybindings: 127 | - command: "binding mode none" 128 | bindings: ["Escape", "Enter"] 129 | - command: "binding mode none" 130 | bindings: ["Control+OemOpenBrackets"] 131 | - commands: ["move left", "binding mode none"] 132 | bindings: ["SUI_S小左"] 133 | - commands: ["move right", "binding mode none"] 134 | bindings: ["SUI_S小右"] 135 | - commands: ["move up", "binding mode none"] 136 | bindings: ["SUI_S小上"] 137 | - commands: ["move down", "binding mode none"] 138 | bindings: ["SUI_S小下"] 139 | - commands: ["move workspace left", "binding mode none"] 140 | bindings: ["Left"] 141 | - commands: ["move workspace right", "binding mode none"] 142 | bindings: ["Right"] 143 | - commands: ["toggle floating", "binding mode none"] 144 | bindings: ["F"] 145 | - commands: ["set floating", "binding mode none"] 146 | bindings: ["Shift+F"] 147 | - name: "tabto" 148 | keybindings: 149 | - command: "binding mode none" 150 | bindings: ["Escape"] 151 | - command: "binding mode none" 152 | bindings: ["Control+OemOpenBrackets"] 153 | - commands: ["focus workspace editor", "binding mode none"] 154 | bindings: ["E"] 155 | - commands: ["focus workspace browser", "binding mode none"] 156 | bindings: ["B"] 157 | - commands: ["focus workspace terminal", "binding mode none"] 158 | bindings: ["T"] 159 | - commands: ["focus workspace im", "binding mode none"] 160 | bindings: ["I"] 161 | - commands: ["focus workspace doc", "binding mode none"] 162 | bindings: ["D"] 163 | - name: "arrive" 164 | keybindings: 165 | - command: "binding mode none" 166 | bindings: ["Escape"] 167 | - command: "binding mode none" 168 | bindings: ["Control+OemOpenBrackets"] 169 | - commands: ["move to workspace editor","focus workspace editor", "binding mode none"] 170 | bindings: ["E"] 171 | - commands: ["move to workspace browser","focus workspace browser", "binding mode none"] 172 | bindings: ["B"] 173 | - commands: ["move to workspace terminal","focus workspace terminal", "binding mode none"] 174 | bindings: ["T"] 175 | - commands: ["move to workspace im","focus workspace im", "binding mode none"] 176 | bindings: ["I"] 177 | - commands: ["move to workspace doc","focus workspace doc", "binding mode none"] 178 | bindings: ["D"] 179 | - commands: ["move to workspace editor", "binding mode none"] 180 | bindings: ["Shift+E"] 181 | - commands: ["move to workspace browser", "binding mode none"] 182 | bindings: ["Shift+B"] 183 | - commands: ["move to workspace terminal", "binding mode none"] 184 | bindings: ["Shift+T"] 185 | - commands: ["move to workspace im", "binding mode none"] 186 | bindings: ["Shift+I"] 187 | - commands: ["move to workspace doc", "binding mode none"] 188 | bindings: ["Shift+D"] 189 | - name: "goto" 190 | keybindings: 191 | - command: "binding mode none" 192 | bindings: ["Escape"] 193 | - command: "binding mode none" 194 | bindings: ["Control+OemOpenBrackets"] 195 | - commands: ["focus workspace recent", "binding mode none"] 196 | bindings: ["SUI_S小左"] 197 | - commands: ["focus workspace recent", "binding mode none"] 198 | bindings: ["SUI_S小右"] 199 | - commands: ["binding mode none", "exec %SUI_ROOT%/sui/not_implement.bat"] 200 | bindings: ["."] 201 | keybindings: 202 | - command: "binding mode launch" 203 | binding: "Control+SUI_S打开" 204 | - command: "binding mode quit" 205 | binding: "Control+SUI_S关闭" 206 | - command: "binding mode goto" 207 | binding: "Control+SUI_S直跳" 208 | - command: "binding mode move" 209 | binding: "Control+SUI_S移动" 210 | - command: "binding mode size" 211 | binding: "Control+SUI_S大小" 212 | - command: "binding mode arrive" 213 | binding: "Control+SUI_S去到标签" 214 | - command: "binding mode tabto" 215 | binding: "Control+SUI_S跳转" 216 | - commands: ["focus left"] 217 | bindings: ["Control+SUI_S小左"] 218 | - commands: ["focus right"] 219 | bindings: ["Control+SUI_S小右"] 220 | - commands: ["focus up"] 221 | bindings: ["Control+SUI_S小上"] 222 | - commands: ["focus down"] 223 | bindings: ["Control+SUI_S小下"] 224 | - commands: ["focus workspace prev"] 225 | bindings: ["Control+F3"] 226 | - commands: ["focus workspace next"] 227 | bindings: ["Control+F2"] 228 | - commands: ["toggle focus mode"] 229 | bindings: ["Control+K"] 230 | - commands: ["toggle focus mode"] 231 | bindings: ["Control+Down"] 232 | - commands: ["toggle focus mode"] 233 | bindings: ["Control+Up"] 234 | -------------------------------------------------------------------------------- /src/glazewm/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | 5 | if exist "%USERPROFILE%\.glaze-wm\config.yaml" ( 6 | if not exist "%USERPROFILE%\.glaze-wm\config.yaml.bak" ( 7 | echo sui find there is glazewm's original config, backup it. 8 | move "%USERPROFILE%\.glaze-wm\config.yaml" "%USERPROFILE%\.glaze-wm\config.yaml.bak" 9 | ) else ( 10 | echo glazewm has a backup file, skip backup. 11 | ) 12 | del "%USERPROFILE%\.glaze-wm\config.yaml" 13 | ) 14 | mklink "%USERPROFILE%\.glaze-wm\config.yaml" "%xdir%\config.yaml" 15 | -------------------------------------------------------------------------------- /src/glazewm/launcher.bat: -------------------------------------------------------------------------------- 1 | %SUI_ROOT%\glazewm\wrun.exe cmd /c %USERPROFILE%\AppData\Local\Programs\utools\uTools.exe -------------------------------------------------------------------------------- /src/glazewm/uninstall.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | set "TempFile=%temp%\SuiTemp.txt" 5 | 6 | fsutil reparsepoint query "%USERPROFILE%\.glaze-wm\config.yaml" >"%TempFile%" 2>&1 7 | if errorlevel 1 ( 8 | echo sui did not install glazewm's config, do nothing with it 9 | ) else ( 10 | del "%USERPROFILE%\.glaze-wm\config.yaml" 11 | echo delete sui's glazewm config ok. 12 | if exist "%USERPROFILE%\.glaze-wm\config.yaml.bak" ( 13 | move "%USERPROFILE%\.glaze-wm\config.yaml.bak" "%USERPROFILE%\.glaze-wm\config.yaml" 14 | echo sui check there is a glazewm's backup config, reinstall your backup config for you. 15 | ) 16 | ) 17 | -------------------------------------------------------------------------------- /src/glazewm/wrun.c: -------------------------------------------------------------------------------- 1 | // https://zhuanlan.zhihu.com/p/157633688?from_voters_page=true 2 | #include 3 | 4 | int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) { 5 | STARTUPINFO si; 6 | PROCESS_INFORMATION pi; 7 | 8 | ZeroMemory(&si, sizeof(si)); 9 | si.cb = sizeof(si); 10 | ZeroMemory(&pi, sizeof(pi)); 11 | 12 | CreateProcessW(NULL, lpCmdLine, NULL, NULL, 0, CREATE_NO_WINDOW, NULL, NULL, &si, &pi); 13 | 14 | return 0; 15 | } -------------------------------------------------------------------------------- /src/glazewm/wrun.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soluty/sui/e38e29d37b28214bee53e7da83ce3bf33cc1d788/src/glazewm/wrun.exe -------------------------------------------------------------------------------- /src/inputrc/.inputrc: -------------------------------------------------------------------------------- 1 | set show-mode-in-prompt on 2 | set show-all-if-ambiguous on 3 | set completion-ignore-case on 4 | set emacs-mode-string "" 5 | $if mode=emacs 6 | "\C-SUI_行编辑": 7 | "\C-SUI_行编辑s": backward-kill-line 8 | "\C-SUI_行编辑t": kill-line 9 | "\C-SUI_行编辑u": undo 10 | "\C-SUI_行编辑U": redo 11 | "\C-SUI_行编辑d": kill-whole-line 12 | "\C-SUI_行编辑n": unix-word-rubout 13 | "\C-SUI_行编辑o": kill-word 14 | # TODO https://stackoverflow.com/questions/59771639/how-do-i-edit-current-shell-command-without-executing-it 15 | "\C-SUI_行编辑e": edit-and-execute-command 16 | "\C-SUI_行编辑y": kill-line 17 | "\C-SUI_行编辑p": kill-line 18 | "\C-SUI_行编辑f": "\C-]" 19 | "\C-SUI_行编辑F": "\C-M-]" 20 | 21 | # Home 22 | "\e[1~": beginning-of-line 23 | # End 24 | "\e[4~": end-of-line 25 | # Delete 26 | "\e[3~": delete-char 27 | # Insert 28 | "\e[2~": quoted-insert 29 | 30 | # for sui unregular use 31 | "\C-N": unix-word-rubout 32 | "\C-O": kill-word 33 | "\C-S": shell-backward-word 34 | "\C-T": shell-forward-word 35 | $endif 36 | 37 | $if Bash 38 | $endif 39 | -------------------------------------------------------------------------------- /src/mouseable/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "command": { 3 | "activate": "Ctrl+F1", 4 | "deactivate": "Esc", 5 | "sniper-mode": "Ctrl", 6 | "sniper-mode-wheel": "Ctrl", 7 | "move-up": "SUI_小上", 8 | "move-down": "SUI_小下", 9 | "move-left": "SUI_小左", 10 | "move-right": "SUI_小右", 11 | "wheel-up": "SUI_大上", 12 | "wheel-down": "SUI_大下", 13 | "wheel-left": "SUI_大左", 14 | "wheel-right": "SUI_大右", 15 | "click-left": "SUI_大左", 16 | "click-middle": "SUI_大左+SUI_大右", 17 | "click-right": "SUI_大右" 18 | }, 19 | "data": { 20 | "cursor-sniper-speed": 5, 21 | "wheel-sniper-speed": 5, 22 | "cursor-acceleration": 3, 23 | "cursor-max-speed": 50, 24 | "wheel-acceleration": 5, 25 | "wheel-max-speed": 180, 26 | "key-timeout": 150, 27 | "show-overlay": true 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/mouseable/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | 5 | if not exist "%APPDATA%\mouseable\configs" ( 6 | md "%APPDATA%\mouseable\configs" 7 | ) 8 | 9 | if exist "%APPDATA%\mouseable\configs\qwerty-wasd.json" ( 10 | if not exist "%APPDATA%\mouseable\configs\qwerty-wasd.json.bak" ( 11 | echo sui find there is mouseable's original config, backup it. 12 | move "%APPDATA%\mouseable\configs\qwerty-wasd.json" "%APPDATA%\mouseable\configs\qwerty-wasd.json.bak" 13 | ) else ( 14 | echo mouseable has a backup file, skip backup. 15 | ) 16 | del "%APPDATA%\mouseable\configs\qwerty-wasd.json" 17 | ) 18 | mklink "%APPDATA%\mouseable\configs\qwerty-wasd.json" "%xdir%\config.json" 19 | -------------------------------------------------------------------------------- /src/mouseable/uninstall.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | set "TempFile=%temp%\SuiTemp.txt" 5 | 6 | fsutil reparsepoint query "%APPDATA%\mouseable\configs\qwerty-wasd.json" >"%TempFile%" 2>&1 7 | if errorlevel 1 ( 8 | echo sui did not install mouseable's config, do nothing with it 9 | ) else ( 10 | del "%APPDATA%\mouseable\configs\qwerty-wasd.json" 11 | echo delete sui's mouseable config ok. 12 | if exist "%APPDATA%\mouseable\configs\qwerty-wasd.json.bak" ( 13 | move "%APPDATA%\mouseable\configs\qwerty-wasd.json.bak" "%APPDATA%\mouseable\configs\qwerty-wasd.json.cfg" 14 | echo sui check there is a mouseable's backup config, reinstall your backup config for you. 15 | ) 16 | ) 17 | -------------------------------------------------------------------------------- /src/nvim/init.lua: -------------------------------------------------------------------------------- 1 | vim.g.mapleader = "," 2 | vim.g.maplocalleader = "," 3 | 4 | local opt = vim.opt 5 | local o = vim.o 6 | opt.timeoutlen = 10000 7 | opt.autowriteall = true 8 | opt.autowrite = true 9 | opt.hidden = false 10 | opt.swapfile = false 11 | opt.fileformat = "unix" 12 | opt.iskeyword:append("-") 13 | opt.selectmode:append("mouse") 14 | o.fileencodings = "utf-8,chinese,cp936" 15 | 16 | vim.cmd("startinsert") 17 | vim.cmd([[ 18 | autocmd BufReadPre * if !&modifiable | set modifiable | endif 19 | ]]) 20 | 21 | -- TODO: move to keymap file 22 | local map = vim.keymap.set 23 | -- no normal mode now.. 24 | -- map("i", "", "", {}) 25 | -- interface edit line 26 | map("i", "", "", {}) 27 | map("i", "d", "d0d$", {}) 28 | map("i", "y", "yy", {}) 29 | map("i", "p", "p", {}) 30 | map("i", "n", "bdw", {}) 31 | map("i", "o", "dw", {}) 32 | map("i", "", "b", {}) 33 | map("i", "", "w", {}) 34 | map("i", "s", "", {}) 35 | map("i", "t", "d$", {}) 36 | map("i", "r", "", {}) 37 | map({ "i" }, "u", "u", { desc = "Go to left window" }) 38 | map({ "i" }, "U", "", { desc = "Go to left window" }) 39 | 40 | map("c", "", "", {}) 41 | map("c", "d", "", {}) 42 | map("c", "y", "yyc", {}) 43 | map("c", "p", '"', {}) 44 | map("c", "n", "", {}) 45 | map("c", "o", "", {}) 46 | map("c", "", "", {}) 47 | map("c", "", "", {}) 48 | map("c", "s", "", {}) 49 | -- delete to line end 50 | 51 | -- quit interface 52 | map({ "i", "c" }, "A", "silent! FloatermKill!:wqa", { desc = "quit nvim" }) 53 | map({ "i", "c" }, "a", ":qa!", { desc = "quit nvim without save" }) 54 | map({ "i", "c" }, "r", ":w:so", { desc = "reload current config file" }) 55 | map({ "i", "c" }, "q", ":close", { desc = "quit current window" }) 56 | map({ "i", "c" }, "q", ":close", { desc = "quit current window" }) 57 | map({ "i", "c" }, "t", ":tabclose", { desc = "quit current tab" }) 58 | map({ "i", "c" }, "o", "o", { desc = "quit to only window" }) 59 | map({ "i", "c" }, "l", "o", { desc = "quit to only window" }) 60 | map({ "i", "c" }, "n", ":tabonly", { desc = "quit to only tab" }) 61 | map({ "n", "v" }, "A", "silent! FloatermKill!:wqa", { desc = "quit nvim" }) 62 | map({ "n", "v" }, "a", ":qa!", { desc = "quit nvim without save" }) 63 | map({ "n", "v" }, "r", ":w:so", { desc = "reload current config file" }) 64 | map({ "n", "v" }, "q", ":close", { desc = "quit current window" }) 65 | map({ "n", "v" }, "q", ":close", { desc = "quit current window" }) 66 | map({ "n", "v" }, "t", ":tabclose", { desc = "quit current tab" }) 67 | map({ "n", "v" }, "o", "o", { desc = "quit to only window" }) 68 | map({ "n", "v" }, "l", "o", { desc = "quit to only window" }) 69 | map({ "n", "v" }, "n", ":tabonly", { desc = "quit to only tab" }) 70 | 71 | -- launch interface 72 | map({ "i", "c" }, "h", "sp", { desc = "垂直方向打开新的窗口" }) 73 | map({ "i", "c" }, "v", "vs", { desc = "水平方向打开新的窗口" }) 74 | map({ "i", "c" }, "t", ":tabnew ", { desc = "tab里打开一个新的文件" }) 75 | map({ "i", "c" }, "w", ":vnew ", { desc = "打开新的窗口" }) 76 | map({ "i", "c" }, "f", "", { desc = "not implement" }) 77 | map({ "i", "c" }, "r", "", { desc = "refresh screen" }) 78 | map({ "i", "c" }, "c", "", { desc = "not implement" }) 79 | map({ "i", "c" }, "R", "", { desc = "not implement" }) 80 | map({ "i", "c" }, "", ":", { desc = "not implement" }) 81 | map({ "i", "c" }, "m", ":hi", { desc = "not implement" }) 82 | 83 | -- focus interface 84 | map({ "i", "c" }, "", "h", { desc = "Go to left window" }) 85 | map({ "i", "c" }, "", "j", { desc = "Go to lower window" }) 86 | map({ "i", "c" }, "", "k", { desc = "Go to upper window" }) 87 | map({ "i", "c" }, "", "l", { desc = "Go to right window" }) 88 | map({ "i", "c" }, "", ":tabprev", { desc = "Go to left tab" }) 89 | map({ "i", "c" }, "", ":tabnext", { desc = "Go to right tab" }) 90 | map({ "n", "v" }, "", "h", { desc = "Go to left window" }) 91 | map({ "n", "v" }, "", "j", { desc = "Go to lower window" }) 92 | map({ "n", "v" }, "", "k", { desc = "Go to upper window" }) 93 | map({ "n", "v" }, "", "l", { desc = "Go to right window" }) 94 | map({ "n", "v" }, "", ":tabprev", { desc = "Go to left tab" }) 95 | map({ "n", "v" }, "", ":tabnext", { desc = "Go to right tab" }) 96 | 97 | -- moveto interface 98 | map({ "i", "c" }, "n", "H", { desc = "Move to left window" }) 99 | map({ "i", "c" }, "i", "J", { desc = "Move to lower window" }) 100 | map({ "i", "c" }, "r", "K", { desc = "Move to upper window" }) 101 | map({ "i", "c" }, "o", "L", { desc = "Move to right window" }) 102 | map({ "i", "c" }, "f", "", { desc = "not implement" }) 103 | map({ "i", "c" }, "", ":-tabmove", { desc = "Move to left tab" }) 104 | map({ "i", "c" }, "", ":+tabmove", { desc = "Move to right tab" }) 105 | map({ "i", "c" }, ".", "", { desc = "not implement" }) 106 | 107 | map("i", "r", "resize +4", { desc = "" }) 108 | map("i", "i", "resize -4", { desc = "" }) 109 | map("i", "o", "vertical resize +4", { desc = "" }) 110 | map("i", "n", "vertical resize -4", { desc = "" }) 111 | 112 | map("i", "n", "", {}) 113 | map("i", "o", "", {}) 114 | 115 | -- this function need flash plugin to be installed 116 | function sui_flash_jump() 117 | local ok, _ = pcall(require, "flash") 118 | if not ok then 119 | vim.notify("please install flash plugin!!!", vim.log.levels.ERROR) 120 | vim.cmd("startinsert") 121 | return 122 | end 123 | require("flash").jump() 124 | vim.cmd("startinsert") 125 | end 126 | function sui_flash_treesitter() 127 | local ok, _ = pcall(require, "flash") 128 | if not ok then 129 | vim.notify("please install flash plugin!!!", vim.log.levels.ERROR) 130 | vim.cmd("startinsert") 131 | return 132 | end 133 | local api = vim.api 134 | require("flash").treesitter() 135 | api.nvim_feedkeys(api.nvim_replace_termcodes("", true, true, true), "n", false) 136 | end 137 | 138 | function sui_flash_treesitter_line() 139 | local ok, _ = pcall(require, "flash") 140 | if not ok then 141 | vim.notify("please install flash plugin!!!", vim.log.levels.ERROR) 142 | vim.cmd("startinsert") 143 | return 144 | end 145 | local api = vim.api 146 | require("flash").treesitter() 147 | api.nvim_feedkeys(api.nvim_replace_termcodes("gH", true, true, true), "n", false) 148 | end 149 | -- coding interface 150 | map({ "i" }, "m", ":/\\V") 151 | -- map({ "x" }, "", "V") 152 | map({ "x" }, "", "ya") 153 | map({ "i" }, "", ":lua sui_flash_jump()") 154 | map({ "i" }, "l", ":lua sui_flash_treesitter()") 155 | map({ "i" }, "L", ":lua sui_flash_treesitter_line()") 156 | map({ "i" }, "", ":lua sui_flash_treesitter()") 157 | map({ "i" }, "", "N") 158 | map({ "i" }, "", "n") 159 | map({ "i" }, "f", "o") 160 | map({ "i" }, "rf", "o") 161 | map({ "i" }, "cf", "o") 162 | 163 | map({ "i" }, "", "o") 164 | 165 | map({ "x" }, "", "u") 166 | map({ "i" }, "w", "viwgH") 167 | map({ "i" }, "w", "viw") 168 | -- map({ "i" }, "w", "viwg") 169 | map({ "i" }, "w", "viwgH") 170 | 171 | map({ "x" }, "", "y") 172 | map({ "i" }, "w", "diwi") 173 | map({ "i" }, "aw", "dawi") 174 | map({ "i" }, "w", "yiwi") 175 | map({ "i" }, "aw", "yawi") 176 | 177 | map({ "n" }, "tnw", "b") 178 | map({ "n" }, "tow", "e") 179 | map({ "n" }, "tw", "w") 180 | 181 | map({ "o" }, "nw", "b") 182 | map({ "o" }, "ow", "e") 183 | map({ "o" }, "w", "iw") 184 | map({ "o" }, "np", "rw") 185 | map({ "o" }, "op", "b") 186 | map({ "o" }, "rp", "e") 187 | -------------------------------------------------------------------------------- /src/nvim/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | 5 | goto :jump 6 | 7 | if exist "%USERPROFILE%\AppData\Local\nvim" ( 8 | move "%USERPROFILE%\AppData\Local\nvim" "%USERPROFILE%\AppData\Local\nvim.bak" 9 | ) 10 | mklink /D "%USERPROFILE%\AppData\Local\nvim" "%xdir%" 11 | 12 | :jump 13 | echo nvim now cant use -------------------------------------------------------------------------------- /src/surfingkeys/index.js: -------------------------------------------------------------------------------- 1 | const { 2 | getBrowserName, 3 | 4 | map, 5 | mapkey, 6 | vmap, 7 | vmapkey, 8 | cmap, 9 | // cmapkey, 10 | imap, 11 | imapkey, 12 | 13 | unmap, 14 | iunmap, 15 | vunmap, 16 | 17 | RUNTIME, 18 | Clipboard, 19 | Hints, 20 | Visual, 21 | Front, 22 | 23 | insertJS, 24 | addSearchAlias, 25 | 26 | aceVimMap, 27 | addVimMapKcey, 28 | getClickableElements, 29 | getFormData, 30 | unmapAllExcept, 31 | readText, 32 | removeSearchAlias, 33 | searchSelectedWith, 34 | tabOpenLink, 35 | } = api 36 | // cmapkey 不存在 37 | const registerKey = (domain, mapObj, siteleader) => { 38 | const { 39 | alias, 40 | callback, 41 | leader = domain === "global" ? "" : siteleader, 42 | category = "misc", 43 | description = "", 44 | path = "(/.*)?", 45 | } = mapObj 46 | const opts = {} 47 | 48 | const key = `${leader}${alias}` 49 | 50 | if (domain !== "global") { 51 | const d = domain.replace(".", "\\.") 52 | opts.domain = new RegExp(`^http(s)?://(([a-zA-Z0-9-_]+\\.)*)(${d})${path}`) 53 | } 54 | 55 | const fullDescription = `#${category} ${description}` 56 | 57 | if (mapObj.mode === undefined) { 58 | if (typeof mapObj.map !== "undefined") { 59 | map(key, mapObj.map) 60 | } else { 61 | mapkey(key, fullDescription, callback, opts) 62 | } 63 | } else if (typeof mapObj.mode == "string") { 64 | for (let i = 0; i < mapObj.mode.length; i++) { 65 | const mode = mapObj.mode[i]; 66 | if (mode == "i") { 67 | if (typeof mapObj.map !== "undefined") { 68 | imap(key, mapObj.map) 69 | } else { 70 | imapkey(key, fullDescription, callback, opts) 71 | } 72 | } else if (mode == "v") { 73 | if (typeof mapObj.map !== "undefined") { 74 | vmap(key, mapObj.map) 75 | } else { 76 | vmapkey(key, fullDescription, callback, opts) 77 | } 78 | } else if (mode == "c") { 79 | if (typeof mapObj.map !== "undefined") { 80 | cmap(key, mapObj.map) 81 | } else { 82 | cmapkey(key, fullDescription, callback, opts) 83 | } 84 | } else if (mode == "n") { 85 | if (typeof mapObj.map !== "undefined") { 86 | map(key, mapObj.map) 87 | } else { 88 | mapkey(key, fullDescription, callback, opts) 89 | } 90 | } 91 | } 92 | } 93 | } 94 | 95 | const registerKeys = (maps, aliases, siteleader) => { 96 | const hydratedAliases = Object.entries( 97 | aliases 98 | ).flatMap(([baseDomain, aliasDomains]) => 99 | aliasDomains.flatMap((a) => ({ [a]: maps[baseDomain] })) 100 | ) 101 | 102 | const mapsAndAliases = Object.assign({}, maps, ...hydratedAliases) 103 | 104 | Object.entries(mapsAndAliases).forEach(([domain, domainMaps]) => { 105 | console.log("domain=", domain) 106 | console.log("domainMaps=", domainMaps) 107 | domainMaps.forEach((mapObj) => registerKey(domain, mapObj, siteleader)) 108 | }) 109 | } 110 | 111 | const util = {} 112 | 113 | util.isDevToolsOpen = () => { 114 | const threshold = 300; 115 | let devtoolsWidth = window.outerWidth - window.innerWidth; 116 | if (devtoolsWidth > threshold) { 117 | return true 118 | } else { 119 | return false 120 | } 121 | } 122 | 123 | const actions = { 124 | quitCurrentTab: function() { 125 | RUNTIME("closeTab") 126 | }, 127 | } 128 | 129 | actions.moveTabNextToTab = (targetId, nextTo, leftOf = false) => 130 | browser.tabs.move(targetId, { 131 | windowId: nextTo.windowId, 132 | index: nextTo.index - (leftOf ? 1 : 0), 133 | }) 134 | 135 | // TODO 136 | // actions.cutTab = async () => 137 | // browser.storage.local.set({ 138 | // cutTabEvent: { 139 | // tabId: (await browser.tabs.query({ currentWindow: true, active: true }))[0].id, 140 | // timestamp: new Date(), 141 | // }, 142 | // }) 143 | 144 | // actions.pasteTab = async (leftOf = false) => { 145 | // const { cutTabEvent = null } = await browser.storage.local.get("cutTabEvent") 146 | // if (!cutTabEvent || (new Date() - cutTabEvent.timestamp) > 60000) return 147 | // const curTab = (await browser.tabs.query({ currentWindow: true, active: true }))[0] 148 | // await actions.moveTabNextToTab(cutTabEvent.tabId, curTab, leftOf) 149 | // } 150 | 151 | actions.dispatchEvents = (type, node, ...eventTypes) => 152 | eventTypes.forEach((t) => { 153 | const e = document.createEvent(type) 154 | e.initEvent(t, true, true) 155 | node.dispatchEvent(e) 156 | }) 157 | 158 | actions.dispatchMouseEvents = actions.dispatchEvents.bind(undefined, [ 159 | "MouseEvents", 160 | ]) 161 | 162 | actions.scrollToHash = (hash = null) => { 163 | const h = (hash || document.location.hash).replace("#", "") 164 | const e = 165 | document.getElementById(h) || document.querySelector(`[name="${h}"]`) 166 | if (!e) { 167 | return 168 | } 169 | e.scrollIntoView({ behavior: "smooth" }) 170 | } 171 | 172 | // URL Manipulation/querying 173 | // ------------------------- 174 | actions.vimEditURL = () => 175 | Front.showEditor( 176 | window.location.href, 177 | (url) => { 178 | actions.openLink(url) 179 | }, 180 | "url" 181 | ) 182 | 183 | actions.getOrgLink = () => `[[${window.location.href}][${document.title}]]` 184 | 185 | actions.getMarkdownLink = ({ 186 | title = document.title, 187 | href = window.location.href, 188 | } = {}) => `[${title}](${href})` 189 | 190 | // Site/Page Information 191 | // --------------------- 192 | 193 | const ddossierUrl = "http://centralops.net/co/DomainDossier.aspx" 194 | 195 | actions.getWhoisUrl = ({ hostname = window.location.hostname } = {}) => 196 | `${ddossierUrl}?dom_whois=true&addr=${hostname}` 197 | 198 | actions.getDnsInfoUrl = ({ 199 | hostname = window.location.hostname, 200 | all = false, 201 | } = {}) => 202 | `${ddossierUrl}?dom_dns=true&addr=${hostname}${all 203 | ? "?dom_whois=true&dom_dns=true&traceroute=true&net_whois=true&svc_scan=true" 204 | : "" 205 | }` 206 | 207 | actions.getGoogleCacheUrl = ({ href = window.location.href } = {}) => 208 | `https://webcache.googleusercontent.com/search?q=cache:${href}` 209 | 210 | actions.getWaybackUrl = ({ href = window.location.href } = {}) => 211 | `https://web.archive.org/web/*/${href}` 212 | 213 | actions.getOutlineUrl = ({ href = window.location.href } = {}) => 214 | `https://outline.com/${href}` 215 | 216 | actions.getAlexaUrl = ({ hostname = window.location.hostname } = {}) => 217 | `https://www.alexa.com/siteinfo/${hostname}` 218 | 219 | actions.getBuiltWithUrl = ({ href = window.location.href } = {}) => 220 | `https://www.builtwith.com/?${href}` 221 | 222 | actions.getWappalyzerUrl = ({ hostname = window.location.hostname } = {}) => 223 | `https://www.wappalyzer.com/lookup/${hostname}` 224 | 225 | actions.getDiscussionsUrl = ({ href = window.location.href } = {}) => 226 | `https://discussions.xojoc.pw/?${new URLSearchParams({ url: href })}` 227 | 228 | // Surfingkeys-specific actions 229 | // ---------------------------- 230 | actions.openAnchor = ({ 231 | newTab = false, 232 | active = true, 233 | prop = "href", 234 | } = {}) => (a) => actions.openLink(a[prop], { newTab, active }) 235 | 236 | actions.openLink = (url, { newTab = false, active = true } = {}) => { 237 | if (newTab) { 238 | RUNTIME("openLink", { 239 | tab: { tabbed: true, active }, 240 | url: url instanceof URL ? url.href : url, 241 | }) 242 | return 243 | } 244 | window.location.assign(url) 245 | } 246 | 247 | actions.editSettings = () => 248 | tabOpenLink(chrome.extension.getURL("/pages/options.html")) 249 | 250 | actions.togglePdfViewer = () => 251 | chrome.storage.local.get("noPdfViewer", (resp) => { 252 | if (!resp.noPdfViewer) { 253 | chrome.storage.local.set({ noPdfViewer: 1 }, () => { 254 | Front.showBanner("PDF viewer disabled.") 255 | }) 256 | } else { 257 | chrome.storage.local.remove("noPdfViewer", () => { 258 | Front.showBanner("PDF viewer enabled.") 259 | }) 260 | } 261 | }) 262 | 263 | actions.previewLink = () => 264 | util.createHints("a[href]", (a) => 265 | Front.showEditor(a.href, (url) => actions.openLink(url), "url") 266 | ) 267 | 268 | actions.scrollElement = (el, dir) => { 269 | actions.dispatchMouseEvents(el, "mousedown") 270 | Normal.scroll(dir) 271 | } 272 | 273 | // FakeSpot 274 | // -------- 275 | actions.fakeSpot = (url = window.location.href) => 276 | actions.openLink(`https://fakespot.com/analyze?ra=true&url=${url}`, { 277 | newTab: true, 278 | active: false, 279 | }) 280 | 281 | actions.viewGodoc = () => 282 | actions.openLink( 283 | `https://godoc.org/${getURLPath({ count: 2, domain: true })}`, 284 | { newTab: true } 285 | ) 286 | 287 | const unmaps = { 288 | mappings: [ 289 | "q", 290 | "k", 291 | "j", 292 | "h", 293 | "l", 294 | "m", 295 | // "t", 296 | "T", 297 | "e", 298 | "d", 299 | "E", 300 | // ".", 301 | // "sb", 302 | // "sw", 303 | // "ob", 304 | // "oe", 305 | // "ow", 306 | // "oy", 307 | // "cp", 308 | // ";cp", 309 | // ";ap", 310 | // "spa", 311 | // "spb", 312 | // "spd", 313 | // "sps", 314 | // "spc", 315 | // "spi", 316 | // "sfr", 317 | // "zQ", 318 | // "zz", 319 | // "zR", 320 | // "ab", 321 | // "Q", 322 | // "q", 323 | // "ag", 324 | // "af", 325 | // ";s", 326 | // "yp", 327 | // "p", 328 | // "", 329 | // "", 330 | // "" 331 | ], 332 | searchAliases: { 333 | // s: ["g", "d", "b", "e", "w", "s", "h", "y"], 334 | }, 335 | } 336 | const maps = {} 337 | iunmap('') 338 | unmap('t') 339 | // unmap('q') 340 | // map('l', "e") 341 | // alias 是你要所定义的快捷键 342 | // map 是surfingkeys原本的操作 343 | // callback 是你的快捷键按下所执行的函数, 和map不一起出现 344 | maps.global = [ 345 | { 346 | mode: "nv", 347 | alias: "", 348 | map: "k", 349 | description: "Scroll up", 350 | }, 351 | { 352 | mode: "nv", 353 | alias: "", 354 | map: "j", 355 | description: "Scroll down", 356 | }, 357 | { 358 | mode: "nv", 359 | alias: "", 360 | map: "h", 361 | }, 362 | { 363 | mode: "nv", 364 | alias: "", 365 | map: "l", 366 | }, 367 | { 368 | mode: "v", 369 | alias: "", 370 | map: "0", 371 | }, 372 | { 373 | mode: "v", 374 | alias: "", 375 | map: "$", 376 | }, 377 | { 378 | alias: "r", 379 | map: "e", 380 | description: "Scroll half page up", 381 | }, 382 | { 383 | alias: "i", 384 | map: "d", 385 | description: "Scroll half page down", 386 | }, 387 | { 388 | alias: "", 389 | map: "E", 390 | description: "focus tab left", 391 | }, 392 | { 393 | alias: "", 394 | map: "R", 395 | description: "focus tab right", 396 | }, 397 | { 398 | mode: "nv", 399 | alias: "", 400 | map: "n", 401 | description: "focus tab right", 402 | }, 403 | { 404 | mode: "nv", 405 | alias: "", 406 | map: "N", 407 | description: "focus tab right", 408 | }, 409 | // quit interface 410 | { 411 | mode: "niv", 412 | alias: "q", 413 | callback: actions.quitCurrentTab, 414 | description: "quit current tab", 415 | }, 416 | { 417 | mode: "niv", 418 | alias: "t", 419 | callback: actions.quitCurrentTab, 420 | description: "quit current tab", 421 | }, 422 | { 423 | mode: "niv", 424 | alias: "w", 425 | callback: actions.quitCurrentTab, 426 | description: "quit current tab", 427 | }, 428 | { 429 | mode: "niv", 430 | alias: "o", 431 | map: "gxx", 432 | description: "quit all except current tab", 433 | }, 434 | { 435 | mode: "niv", 436 | alias: "n", 437 | map: "gxx", 438 | description: "quit all except current tab", 439 | }, 440 | // fallback 441 | { 442 | mode: "niv", 443 | alias: "", 444 | map: "", 445 | description: "quit current tab", 446 | }, 447 | // goto interface 448 | { 449 | mode: "niv", 450 | aliais: "n", 451 | map: "S", 452 | description: "go back", 453 | }, 454 | { 455 | mode: "niv", 456 | alias: "o", 457 | map: "D", 458 | description: "launch dev tools", 459 | }, 460 | { 461 | mode: "niv", 462 | alias: ".", 463 | map: "H", 464 | description: "launch dev tools", 465 | }, 466 | { 467 | alias: "gn", 468 | mode: "nv", 469 | map: "S", 470 | description: "go back", 471 | }, 472 | { 473 | mode: "nv", 474 | alias: "go", 475 | map: "D", 476 | description: "launch dev tools", 477 | }, 478 | { 479 | mode: "nv", 480 | alias: "g.", 481 | map: "H", 482 | description: "launch dev tools", 483 | }, 484 | // launch interface 485 | { 486 | mode: "niv", 487 | alias: "l", 488 | callback: actions.vimEditURL, 489 | description: "launch dev tools", 490 | }, 491 | { 492 | mode: "niv", 493 | alias: "t", 494 | callback: function() { 495 | tabOpenLink("www.bilibili.com") 496 | }, 497 | }, 498 | { 499 | alias: "ll", 500 | category: "aa", 501 | callback: actions.vimEditURL, 502 | description: "vim edit" 503 | }, 504 | { 505 | alias: "lt", 506 | callback: function() { 507 | tabOpenLink("www.bilibili.com") 508 | }, 509 | }, 510 | { 511 | alias: "lc", 512 | callback: actions.editSettings, 513 | }, 514 | // focus interface 515 | { 516 | mode: "niv", 517 | alias: "", 518 | map: "E", 519 | }, 520 | { 521 | mode: "niv", 522 | alias: "", 523 | map: "R", 524 | }, 525 | { 526 | mode: "niv", 527 | alias: "n", 528 | map: "<<", 529 | }, 530 | { 531 | mode: "niv", 532 | alias: "o", 533 | map: ">>", 534 | }, 535 | { 536 | mode: "niv", 537 | alias: "", 538 | map: "<<", 539 | }, 540 | { 541 | mode: "niv", 542 | alias: "", 543 | map: ">>", 544 | }, 545 | { 546 | mode: "nv", 547 | alias: "mn", 548 | map: "<<", 549 | }, 550 | { 551 | mode: "nv", 552 | alias: "mo", 553 | map: ">>", 554 | }, 555 | { 556 | mode: "nv", 557 | alias: "m", 558 | map: "<<", 559 | }, 560 | { 561 | mode: "nv", 562 | alias: "m", 563 | map: ">>", 564 | }, 565 | { 566 | mode: "niv", 567 | alias: ".", 568 | map: "T", 569 | }, 570 | { 571 | mode: "nv", 572 | alias: "t.", 573 | map: "T", 574 | }, 575 | { 576 | mode: "nv", 577 | alias: "te", 578 | map: "gg", 579 | }, 580 | { 581 | mode: "nv", 582 | alias: "toe", 583 | map: "G", 584 | }, 585 | { 586 | mode: "nv", 587 | alias: "tne", 588 | map: "gg", 589 | }, 590 | { 591 | mode: "nv", 592 | alias: "gg", 593 | callback: () => Front.openOmnibar({ type: "History" }), 594 | }, 595 | { 596 | mode: "nv", 597 | alias: "sz", 598 | callback: function() { 599 | var el = document.documentElement 600 | if (document.fullscreenElement) { 601 | document.exitFullscreen() 602 | } else { 603 | el.requestFullscreen() 604 | } 605 | }, 606 | }, 607 | { 608 | mode: "niv", 609 | alias: "z", 610 | callback: function() { 611 | var el = document.documentElement 612 | if (document.fullscreenElement) { 613 | document.exitFullscreen() 614 | } else { 615 | el.requestFullscreen() 616 | } 617 | }, 618 | }, 619 | ] 620 | 621 | cmap('', '') 622 | cmap('', '') 623 | cmap('', '') 624 | cmap('', '') 625 | cmap('', '') 626 | cmap('', '') 627 | 628 | settings.omnibarMaxResults = 15 629 | settings.omnibarHistoryCacheSize = 10000 630 | 631 | maps["bilibili"] = [ 632 | { 633 | alias: "q", 634 | map: "x", 635 | description: "launch dev tools", 636 | }, 637 | ] 638 | 639 | const keys = { 640 | maps, 641 | unmaps, 642 | } 643 | 644 | const conf = { 645 | siteleader: ',', 646 | keys, 647 | } 648 | 649 | const main = async () => { 650 | window.surfingKeys = api 651 | console.log("start map keys...") 652 | 653 | if (conf.keys && conf.keys.maps) { 654 | const { keys } = conf 655 | const { maps, aliases = {} } = keys 656 | registerKeys(maps, aliases, conf.siteleader) 657 | } 658 | 659 | if (conf.keys && conf.keys.unmaps) { 660 | const { unmaps } = conf.keys 661 | if (unmaps.mappings) { 662 | unmaps.mappings.forEach((m) => unmap(m)) 663 | } 664 | if (unmaps.searchAliases) { 665 | Object.entries(unmaps.searchAliases).forEach(([leader, items]) => { 666 | items.forEach((v) => removeSearchAlias(v, leader)) 667 | }) 668 | } 669 | } 670 | 671 | if (conf.keys && conf.keys.maps) { 672 | const { keys } = conf 673 | const { maps, aliases = {} } = keys 674 | registerKeys(maps, aliases, conf.siteleader) 675 | } 676 | } 677 | 678 | if (typeof window !== "undefined") { 679 | main() 680 | } 681 | -------------------------------------------------------------------------------- /src/surfingkeys/readme.md: -------------------------------------------------------------------------------- 1 | https://blog.csdn.net/Lee_0220/article/details/108617984 2 | -------------------------------------------------------------------------------- /src/touchcursor/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | set "layout=%~1" 5 | echo TouchCursor layout is: %layout% 6 | if not exist "%USERPROFILE%\AppData\Roaming\TouchCursor" ( 7 | md "%USERPROFILE%\AppData\Roaming\TouchCursor" 8 | ) 9 | 10 | if exist "%USERPROFILE%\AppData\Roaming\TouchCursor\settings.cfg" ( 11 | if not exist "%USERPROFILE%\AppData\Roaming\TouchCursor\settings.cfg.bak" ( 12 | echo sui find there is TouchCursor's original config, backup it. 13 | move "%USERPROFILE%\AppData\Roaming\TouchCursor\settings.cfg" "%USERPROFILE%\AppData\Roaming\TouchCursor\settings.cfg.bak" 14 | ) else ( 15 | echo TouchCursor has a backup file, skip backup. 16 | ) 17 | del "%USERPROFILE%\AppData\Roaming\TouchCursor\settings.cfg" 18 | ) 19 | mklink "%USERPROFILE%\AppData\Roaming\TouchCursor\settings.cfg" "%xdir%settings_%layout%.cfg" 20 | -------------------------------------------------------------------------------- /src/touchcursor/settings_norman.cfg: -------------------------------------------------------------------------------- 1 | 22 serialization::archive 5 0 6 1 0 1 1 32 1 0 256 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65584 65585 65586 65587 65588 65589 65590 65591 65592 65593 0 0 0 0 0 0 0 65723 32 65728 33 34 65755 187 0 40 0 0 8 65589 37 39 65722 0 38 36 35 65725 192 219 0 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 123 220 122 46 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 65758 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -------------------------------------------------------------------------------- /src/touchcursor/settings_qwerty.cfg: -------------------------------------------------------------------------------- 1 | 22 serialization::archive 5 0 6 1 0 1 1 32 1 1 256 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32 0 34 33 35 0 13 38 37 40 39 0 0 8 0 0 0 36 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 46 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -------------------------------------------------------------------------------- /src/touchcursor/uninstall.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | set "TempFile=%temp%\SuiTemp.txt" 5 | 6 | fsutil reparsepoint query "%USERPROFILE%\AppData\Roaming\TouchCursor\settings.cfg" >"%TempFile%" 2>&1 7 | if errorlevel 1 ( 8 | echo sui did not install TouchCursor's config, do nothing with it 9 | ) else ( 10 | del "%USERPROFILE%\AppData\Roaming\TouchCursor\settings.cfg" 11 | echo delete sui's TouchCursor config ok. 12 | if exist "%USERPROFILE%\AppData\Roaming\TouchCursor\settings.cfg.bak" ( 13 | move "%USERPROFILE%\AppData\Roaming\TouchCursor\settings.cfg.bak" "%USERPROFILE%\AppData\Roaming\TouchCursor\settings.cfg" 14 | echo sui check there is a TouchCursor's backup config, reinstall your backup config for you. 15 | ) 16 | ) 17 | -------------------------------------------------------------------------------- /src/vscode/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | 5 | if exist "%USERPROFILE%\AppData\Roaming\Code\User\keybindings.json" ( 6 | if not exist "%USERPROFILE%\AppData\Roaming\Code\User\keybindings.json.bak" ( 7 | echo sui find there is vscode's original config, backup it. 8 | move "%USERPROFILE%\AppData\Roaming\Code\User\keybindings.json" "%USERPROFILE%\AppData\Roaming\Code\User\keybindings.json.bak" 9 | ) else ( 10 | echo vscode has a backup file, skip backup. 11 | ) 12 | del "%USERPROFILE%\AppData\Roaming\Code\User\keybindings.json" 13 | ) 14 | mklink "%USERPROFILE%\AppData\Roaming\Code\User\keybindings.json" "%xdir%keybindings.json" 15 | -------------------------------------------------------------------------------- /src/vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | [ 2 | // some trick in vscode 3 | { 4 | "key": "escape", 5 | "command": "notifications.hideToasts", 6 | "when": "notificationToastsVisible", 7 | }, 8 | { 9 | "key": "escape", 10 | "command": "closeReferenceSearch", 11 | "when": "referenceSearchVisible" 12 | }, 13 | { 14 | "key": "escape", 15 | "command": "removeSecondaryCursors", 16 | "when": "editorHasMultipleSelections && textInputFocus" 17 | }, 18 | { 19 | "key": "escape", 20 | "command": "workbench.action.focusActiveEditorGroup", 21 | "when": "auxiliaryBarFocus || panelFocus || sideBarFocus", 22 | }, 23 | { 24 | "key": "escape", 25 | "command": "list.closeFind", 26 | "when": "listFocus && treeFindOpen" 27 | }, 28 | { 29 | "key": "escape", 30 | "command": "notifications.hideList", 31 | "when": "notificationCenterVisible" 32 | }, 33 | // common interface 34 | { 35 | "key": "alt+SUI_窗口 .", 36 | "command": "workbench.action.quickOpenView", 37 | }, 38 | { 39 | "key": "alt+SUI_窗口 t", 40 | "command": "workbench.action.terminal.focus", 41 | }, 42 | { 43 | "key": "alt+SUI_窗口 e", 44 | "command": "workbench.explorer.fileView.focus", 45 | }, 46 | { 47 | "key": "alt+SUI_窗口 o", 48 | "command": "workbench.panel.output.focus", 49 | }, 50 | { 51 | "key": "alt+SUI_窗口 g", 52 | "command": "workbench.view.scm", 53 | }, 54 | { 55 | "key": "alt+SUI_窗口 p", 56 | "command": "workbench.extensions.action.focusExtensionsView", 57 | }, 58 | { 59 | "key": "alt+SUI_窗口 h", 60 | "command": "editor.action.showDefinitionPreviewHover", 61 | }, 62 | { 63 | "key": "alt+SUI_窗口 w", 64 | "command": "editor.action.showDefinitionPreviewHover", 65 | }, 66 | { 67 | "key": "alt+SUI_窗口 alt+SUI_窗口", 68 | "command": "editor.action.showDefinitionPreviewHover", 69 | }, 70 | { 71 | "key": "alt+SUI_窗口 m", 72 | "command": "workbench.action.focusTitleBar", 73 | }, 74 | { 75 | "key": "alt+SUI_窗口 c", 76 | "command": "references-view.showCallHierarchy", 77 | "when": "editorHasCallHierarchyProvider && editorTextFocus && !inReferenceSearchEditor", 78 | }, 79 | { 80 | "key": "alt+c", 81 | "command": "references-view.showOutgoingCalls", 82 | "when": "focusedView == references-view.tree && !treeFindOpen && reference-list.source == callHierarchy && references-view.callHierarchyMode == showIncoming", 83 | }, 84 | { 85 | "key": "alt+c", 86 | "command": "references-view.showIncomingCalls", 87 | "when": "focusedView == references-view.tree && !treeFindOpen && reference-list.source == callHierarchy && references-view.callHierarchyMode == showOutgoing", 88 | }, 89 | { 90 | "key": "alt+SUI_打开 .", 91 | "command": "workbench.action.showCommands", 92 | }, 93 | //// editor text 94 | // launch interface 95 | { 96 | "key": "alt+SUI_打开 h", 97 | "command": "workbench.action.splitEditorDown", 98 | }, 99 | { 100 | "key": "alt+SUI_打开 v", 101 | "command": "workbench.action.splitEditorRight", 102 | }, 103 | { 104 | "key": "alt+SUI_打开 c", 105 | "command": "workbench.action.openGlobalKeybindingsFile", 106 | }, 107 | { 108 | "key": "alt+SUI_打开 r", 109 | "command": "workbench.action.reloadWindow", 110 | }, 111 | { 112 | "key": "alt+SUI_打开 n f", 113 | "command": "workbench.action.files.newFile", 114 | }, 115 | // focus interface 116 | { 117 | "key": "alt+SUI_小左", 118 | "command": "workbench.action.focusLeftGroup", 119 | }, 120 | { 121 | "key": "alt+SUI_小右", 122 | "command": "workbench.action.focusRightGroup", 123 | }, 124 | { 125 | "key": "alt+SUI_小上", 126 | "command": "workbench.action.focusAboveGroup", 127 | }, 128 | { 129 | "key": "alt+SUI_小下", 130 | "command": "workbench.action.focusBelowGroup", 131 | }, 132 | { 133 | "key": "alt+SUI_小左", 134 | "command": "metaGo.selectionSwitchActiveWithAnchor", 135 | "when": "textInputFocus && editorHasSelection", 136 | }, 137 | { 138 | "key": "alt+SUI_小右", 139 | "command": "metaGo.selectionSwitchActiveWithAnchor", 140 | "when": "textInputFocus && editorHasSelection", 141 | }, 142 | { 143 | "key": "alt+left", 144 | "command": "workbench.action.previousEditorInGroup", 145 | "when": "editorFocus" 146 | }, 147 | { 148 | "key": "alt+right", 149 | "command": "workbench.action.nextEditorInGroup", 150 | "when": "editorFocus" 151 | }, 152 | { 153 | "key": "alt+SUI_窗口 left", 154 | "command": "extension.multiCommand.execute", 155 | "args": { 156 | "sequence": [ 157 | "workbench.action.focusSideBar", 158 | "workbench.action.focusSideBar", 159 | ], 160 | }, 161 | }, 162 | { 163 | "key": "alt+SUI_窗口 right", 164 | "command": "extension.multiCommand.execute", 165 | "args": { 166 | "sequence": [ 167 | "workbench.action.focusAuxiliaryBar", 168 | "workbench.action.focusAuxiliaryBar", 169 | ], 170 | }, 171 | }, 172 | { 173 | "key": "alt+SUI_窗口 up", 174 | "command": "workbench.action.focusActiveEditorGroup", 175 | }, 176 | { 177 | "key": "alt+SUI_窗口 down", 178 | "command": "workbench.action.focusPanel", 179 | }, 180 | // quit interface 181 | { 182 | "key": "alt+SUI_关闭 SUI_关闭", 183 | "command": "workbench.action.closeActiveEditor", 184 | // "when": "editorFocus", 185 | }, 186 | { 187 | "key": "alt+SUI_关闭 SUI_标签", 188 | "command": "workbench.action.closeEditorsAndGroup", 189 | "when": "editorFocus", 190 | }, 191 | { 192 | "key": "alt+SUI_关闭 o", 193 | "command": "workbench.action.closeOtherEditors", 194 | }, 195 | { 196 | "key": "alt+SUI_关闭 n", 197 | "command": "workbench.action.editorLayoutSingle", 198 | }, 199 | { 200 | "key": "alt+SUI_关闭 a", 201 | "command": "workbench.action.closeWindow", 202 | }, 203 | // size interface 204 | { 205 | "key": "alt+shift+SUI_大小 SUI_小左", 206 | "command": "workbench.action.decreaseViewWidth", 207 | "when": "editorTextFocus", 208 | }, 209 | { 210 | "key": "alt+shift+SUI_大小 SUI_小右", 211 | "command": "workbench.action.increaseViewWidth", 212 | "when": "editorTextFocus", 213 | }, 214 | { 215 | "key": "alt+shift+SUI_大小 SUI_小下", 216 | "command": "workbench.action.decreaseViewHeight", 217 | "when": "editorTextFocus", 218 | }, 219 | { 220 | "key": "alt+shift+SUI_大小 SUI_小上", 221 | "command": "workbench.action.increaseViewHeight", 222 | "when": "editorTextFocus", 223 | }, 224 | { 225 | "key": "alt+shift+SUI_大小 m", 226 | "command": "extension.multiCommand.execute", 227 | "args": { 228 | "sequence": [ 229 | "workbench.action.closeSidebar", 230 | "workbench.action.closeAuxiliaryBar", 231 | "workbench.action.closePanel", 232 | ], 233 | }, 234 | }, 235 | { 236 | "key": "alt+shift+SUI_大小 z", 237 | "command": "workbench.action.toggleZenMode", 238 | }, 239 | { 240 | "key": "alt+shift+SUI_大小 u", 241 | "command": "editor.action.fontZoomIn", 242 | }, 243 | { 244 | "key": "alt+shift+SUI_大小 d", 245 | "command": "editor.action.fontZoomOut", 246 | }, 247 | { 248 | "key": "alt+shift+SUI_大小 s", 249 | "command": "editor.action.fontZoomReset", 250 | }, 251 | // move interface 252 | { 253 | "key": "alt+shift+SUI_移动 SUI_小左", 254 | "command": "workbench.action.moveActiveEditorGroupLeft", 255 | }, 256 | { 257 | "key": "alt+shift+SUI_移动 SUI_小右", 258 | "command": "workbench.action.moveActiveEditorGroupRight", 259 | }, 260 | { 261 | "key": "alt+shift+SUI_移动 SUI_小下", 262 | "command": "workbench.action.moveActiveEditorGroupDown", 263 | }, 264 | { 265 | "key": "alt+shift+SUI_移动 SUI_小上", 266 | "command": "workbench.action.moveActiveEditorGroupUp", 267 | }, 268 | //// bottom panel 269 | { 270 | "key": "alt+left", 271 | "command": "workbench.action.previousPanelView", 272 | "when": "panelFocus" 273 | }, 274 | { 275 | "key": "alt+right", 276 | "command": "workbench.action.nextPanelView", 277 | "when": "panelFocus" 278 | }, 279 | { 280 | "key": "alt+SUI_打开 v", 281 | "command": "workbench.action.terminal.split", 282 | "when": "terminalFocus" 283 | }, 284 | { 285 | "key": "alt+SUI_大小 m", 286 | "command": "workbench.action.toggleMaximizedPanel", 287 | "when": "terminalFocus" 288 | }, 289 | { 290 | "key": "alt+SUI_关闭 q", 291 | "command": "workbench.action.closePanel", 292 | "when": "panelFocus" 293 | }, 294 | { 295 | "key": "alt+SUI_关闭 q", 296 | "command": "workbench.action.terminal.kill", 297 | "when": "terminalFocus" 298 | }, 299 | //// sidebar 300 | { 301 | "key": "alt+SUI_关闭 q", 302 | "command": "workbench.action.closeSidebar", 303 | "when": "sideBarFocus" 304 | }, 305 | { 306 | "key": "alt+up", 307 | "command": "workbench.action.previousSideBarView", 308 | "when": "sideBarFocus" 309 | }, 310 | { 311 | "key": "alt+down", 312 | "command": "workbench.action.nextSideBarView", 313 | "when": "sideBarFocus" 314 | }, 315 | { 316 | "key": "alt+left", 317 | "command": "workbench.action.previousSideBarView", 318 | "when": "sideBarFocus" 319 | }, 320 | { 321 | "key": "alt+right", 322 | "command": "workbench.action.nextSideBarView", 323 | "when": "sideBarFocus" 324 | }, 325 | { 326 | // "key": "alt+SUI_小上", 327 | // "command": "workbench.action.showCommands", 328 | // "when": "editorTextFocus" 329 | // workbench.action.focusTitleBar 330 | // workbench.action.showCommands 331 | // "when": "explorerViewletCompressedFocus", 332 | // "when": "bannerFocused", 333 | // iconSelectBoxFocus 334 | // "treeElementCanExpand" 335 | // "when": "listFocus && !inputFocus", 336 | }, 337 | { 338 | "key": "alt+SUI_小下", 339 | "command": "command-runner.run", 340 | "args": { 341 | "command": "\"%ProgramFiles%/AutoHotkey/AutoHotkey.exe\" %SUI_ROOT%/autohotkey/v1/vscode/viewcontainer_focus_down.ahk", 342 | "terminal": "cmd" 343 | }, 344 | "when": "sideBarFocus", 345 | }, 346 | { 347 | "key": "alt+SUI_小上", 348 | "command": "command-runner.run", 349 | "args": { 350 | "command": "\"%ProgramFiles%/AutoHotkey/AutoHotkey.exe\" %SUI_ROOT%/autohotkey/v1/vscode/viewcontainer_focus_up.ahk", 351 | "terminal": "cmd" 352 | }, 353 | "when": "sideBarFocus", 354 | }, 355 | //// right sidebari 356 | { 357 | "key": "alt+SUI_关闭", 358 | "command": "workbench.action.closeAuxiliaryBar", 359 | "when": "auxiliaryBarFocus" 360 | }, 361 | // coding interface 362 | { 363 | "key": "alt+SUI_大小", 364 | "command": "list.find", 365 | "when": "listFocus && listSupportsFind" 366 | }, 367 | { 368 | "key": "alt+SUI_大小", 369 | "command": "metaGo.gotoSmart", 370 | "when": "editorTextFocus", 371 | }, 372 | { 373 | "key": "alt+SUI_选择模式 SUI_大小", 374 | "command": "metaGo.selectSmart", 375 | "when": "editorTextFocus", 376 | }, 377 | { 378 | "key": "alt+SUI_拷贝 SUI_大小", 379 | "command": "extension.multiCommand.execute", 380 | "args": { 381 | "sequence": [ 382 | "metaGo.selectSmart", // 等它走完 383 | // "editor.action.clipboardCopyAction", 384 | // "workbench.action.showCommands", 385 | { 386 | "command": "command-runner.run", 387 | "args": { 388 | "command": "echo hello" 389 | } 390 | }, 391 | ], 392 | }, 393 | // "command": "metaGo.selectSmart", 394 | "when": "editorTextFocus", 395 | }, 396 | { 397 | "key": "alt+SUI_删除 SUI_大小", 398 | "command": "metaGo.metaJump.deleteToSmart", 399 | "when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus", 400 | }, 401 | // s and 文本对象 iw, aw, w, iw, aw, 增加 nw, ow, rw 402 | // s, w, l, t, b, q, f, u rb,rq, 403 | // d,y,v,c,gc,gu,gU,gs comment alt+c +c 404 | // { 405 | // "key": "alt+SUI_删除 ", 406 | // "command": "editor.action.clipboardCutAction", 407 | // "when": "editorTextFocus && editorHasSelection", 408 | // }, 409 | { 410 | "key": "alt+SUI_拷贝", 411 | "command": "extension.multiCommand.execute", 412 | "args": { 413 | "sequence": [ 414 | "editor.action.clipboardCopyAction", 415 | { 416 | "command": "delayedcommand.run", 417 | "args": { 418 | "delay": 100, 419 | "command": "cursorLeft", 420 | }, 421 | }, 422 | ], 423 | }, 424 | "when": "editorTextFocus && editorHasSelection", 425 | }, 426 | { 427 | "key": "alt+c alt+c", 428 | "command": "editor.action.commentLine", 429 | "when": "editorTextFocus && !editorReadonly", 430 | }, 431 | { 432 | "key": "alt+SUI_直跳 c c", 433 | "command": "editor.action.commentLine", 434 | "when": "editorTextFocus && !editorReadonly", 435 | }, 436 | { 437 | "key": "alt+SUI_删除 ", 438 | "command": "editor.action.clipboardCutAction", 439 | "when": "editorTextFocus && editorHasSelection", 440 | }, 441 | { 442 | "key": "alt+SUI_删除 d", 443 | "command": "editor.action.deleteLines", 444 | "when": "editorTextFocus", 445 | }, 446 | { 447 | "key": "alt+SUI_删除 SUI_对象外部lt+SUI_删除 ", 448 | "command": "editor.action.deleteLines", 449 | "when": "editorTextFocus", 450 | }, 451 | { 452 | "key": "alt+SUI_粘贴", 453 | "command": "editor.action.clipboardPasteAction", 454 | }, 455 | { 456 | "key": "shift+up", 457 | "command": "cursorUpSelect", 458 | "when": "textInputFocus" 459 | }, 460 | { 461 | "key": "shift+up", 462 | "command": "cursorColumnSelectUp", 463 | "when": "editorColumnSelection && textInputFocus" 464 | }, 465 | // object, w,W,l,q,b,f, 466 | { 467 | "key": "alt+SUI_直跳 SUI_小左", 468 | "command": "workbench.action.navigateBack", 469 | }, 470 | { 471 | "key": "alt+SUI_直跳 SUI_小右", 472 | "command": "workbench.action.navigateForward", 473 | }, 474 | { 475 | "key": "alt+SUI_直跳 d", 476 | "command": "editor.action.goToDeclaration", 477 | }, 478 | { 479 | "key": "alt+SUI_直跳 r", 480 | "command": "editor.action.goToReferences", 481 | }, 482 | { 483 | "key": "alt+SUI_直跳 i", 484 | "command": "editor.action.goToImplementation", 485 | }, 486 | { 487 | // 从剪切板替换 488 | "key": "alt+z r w", 489 | "command": "extension.multiCommand.execute", 490 | "args": { 491 | "sequence": [ 492 | "cursorWordLeft", 493 | "cursorWordRightSelect", 494 | "editor.action.clipboardPasteAction", 495 | ], 496 | }, 497 | }, 498 | { 499 | "key": "alt+z r q", 500 | "command": "extension.multiCommand.execute", 501 | "args": { 502 | "sequence": [ 503 | "quickSelect.cursorQuoteSelect", 504 | "editor.action.clipboardPasteAction", 505 | ], 506 | }, 507 | }, 508 | //mod:to t 509 | // word 510 | { 511 | "key": "alt+SUI_跳转 w", 512 | "command": "cursorWordStartRight", 513 | "when": "editorTextFocus", 514 | }, 515 | { 516 | "key": "alt+SUI_跳转 SUI_小左 w", 517 | "command": "cursorWordStartLeft", 518 | "when": "editorTextFocus", 519 | }, 520 | { 521 | "key": "alt+SUI_跳转 SUI_小右 w", 522 | "command": "cursorWordStartRight", 523 | "when": "editorTextFocus", 524 | }, 525 | // big word 526 | { 527 | "key": "alt+SUI_跳转 shift+w", 528 | "command": "metaGo.cursorSpaceWordRight", 529 | "when": "editorTextFocus", 530 | }, 531 | { 532 | "key": "alt+SUI_跳转 SUI_小左 shift+w", 533 | "command": "metaGo.cursorSpaceWordLeft", 534 | "when": "editorTextFocus", 535 | }, 536 | { 537 | "key": "alt+SUI_跳转 SUI_小右 shift+w", 538 | "command": "metaGo.cursorSpaceWordRight", 539 | "when": "editorTextFocus", 540 | }, 541 | // paragraphs 542 | { 543 | "key": "alt+SUI_跳转 p", 544 | "command": "metaGo.gotoEmptyLineDown", 545 | "when": "editorTextFocus", 546 | }, 547 | { 548 | "key": "alt+SUI_跳转 SUI_小左 p", 549 | "command": "metaGo.gotoEmptyLineUp", 550 | "when": "editorTextFocus", 551 | }, 552 | { 553 | "key": "alt+SUI_跳转 SUI_小右 p", 554 | "command": "metaGo.gotoEmptyLineDown", 555 | "when": "editorTextFocus", 556 | }, 557 | // line 558 | { 559 | "key": "alt+SUI_跳转 l", 560 | "command": "workbench.action.gotoLine", 561 | "when": "editorTextFocus", 562 | }, 563 | { 564 | "key": "alt+SUI_跳转 SUI_小左 l", 565 | "command": "cursorLineStart", 566 | "when": "editorTextFocus", 567 | }, 568 | { 569 | "key": "alt+SUI_跳转 SUI_小右 l", 570 | "command": "cursorLineEnd", 571 | "when": "editorTextFocus", 572 | }, 573 | // bracket 574 | { 575 | "key": "alt+SUI_跳转 b", 576 | "command": "editor.action.jumpToBracket", 577 | "when": "editorTextFocus", 578 | }, 579 | { 580 | "key": "alt+SUI_跳转 SUI_小左 b", 581 | "command": "extension.multiCommand.execute", 582 | "args": { 583 | "sequence": [ 584 | "metaGo.jumpToBracket", 585 | "cursorRight", 586 | "metaGo.jumpToBracket", 587 | ], 588 | }, 589 | "when": "editorTextFocus", 590 | }, 591 | { 592 | "key": "alt+SUI_跳转 SUI_小右 b", 593 | "command": "extension.multiCommand.execute", 594 | "args": { 595 | "sequence": [ 596 | "metaGo.jumpToBracket", 597 | "cursorRight", 598 | "metaGo.jumpToBracket", 599 | "metaGo.jumpToBracket", 600 | ], 601 | }, 602 | "when": "editorTextFocus", 603 | }, 604 | // quote 605 | { 606 | "key": "alt+SUI_跳转 q", 607 | "command": "quickSelect.cursorQuoteEnd", 608 | "when": "editorTextFocus", 609 | }, 610 | { 611 | "key": "alt+SUI_跳转 SUI_小左 q", 612 | "command": "quickSelect.cursorQuoteStart", 613 | "when": "editorTextFocus", 614 | }, 615 | { 616 | "key": "alt+SUI_跳转 SUI_小右 q", 617 | "command": "quickSelect.cursorQuoteEnd", 618 | "when": "editorTextFocus", 619 | }, 620 | // universe 621 | { 622 | "key": "alt+SUI_跳转 u", 623 | "command": "cursorTop", 624 | "when": "editorTextFocus", 625 | }, 626 | { 627 | "key": "alt+SUI_跳转 SUI_小左 u", 628 | "command": "cursorTop", 629 | "when": "editorTextFocus", 630 | }, 631 | { 632 | "key": "alt+SUI_跳转 SUI_小右 u", 633 | "command": "cursorBottom", 634 | "when": "editorTextFocus", 635 | }, 636 | // search 637 | { 638 | "key": "alt+SUI_跳转 s", 639 | "command": "metaGo.addCursorAfter", 640 | "when": "editorTextFocus", 641 | }, 642 | { 643 | "key": "alt+SUI_跳转 SUI_对象两边 s", 644 | "command": "metaGo.addCursorAfter", 645 | "when": "editorTextFocus", 646 | }, 647 | //mod:select v 648 | { 649 | "key": "alt+shift+SUI_选择模式", 650 | "command": "extension.multiCommand.execute", 651 | "args": { 652 | "sequence": [ 653 | "cursorLineStart", 654 | "cursorLineEndSelect", 655 | "cursorRightSelect", 656 | ], 657 | }, 658 | "when": "editorTextFocus && !editorHasSelection", 659 | }, 660 | { //ops... this regular op need a little plugin.... 661 | "key": "alt+shift+SUI_选择模式", 662 | "command": "extension.multiCommand.execute", 663 | "args": { 664 | "sequence": [ 665 | "bcjti.selectLine", 666 | "metaGo.selectionSwitchActiveWithAnchor", 667 | "cursorLineStartSelect", 668 | "metaGo.selectionSwitchActiveWithAnchor", 669 | "cursorLeftSelect", 670 | "cursorLineEndSelect", 671 | "cursorRightSelect", 672 | ], 673 | }, 674 | "when": "editorTextFocus && editorHasSelection", 675 | }, 676 | { 677 | "key": "alt+SUI_选择模式", 678 | "command": "editor.action.toggleColumnSelection", 679 | "when": "editorTextFocus && editorHasSelection", 680 | }, 681 | // { 682 | // "key": "alt+SUI_选择模式", 683 | // "command": "editor.action.toggleColumnSelection", 684 | // "when": "editorTextFocus && editorHasSelection", 685 | // }, 686 | // word 687 | { 688 | "key": "alt+SUI_选择模式 w", 689 | "command": "extension.multiCommand.execute", 690 | "args": { 691 | "sequence": [ 692 | "cursorWordLeft", 693 | "cursorWordRightSelect", 694 | ], 695 | }, 696 | "when": "editorTextFocus && !editorHasSelection", 697 | }, 698 | { 699 | "key": "alt+SUI_选择模式 SUI_小左 w", 700 | "command": "cursorWordLeftSelect", 701 | "when": "editorTextFocus && !editorHasSelection", 702 | }, 703 | { 704 | "key": "alt+SUI_选择模式 SUI_小右 w", 705 | "command": "cursorWordRightSelect", 706 | "when": "editorTextFocus && !editorHasSelection", 707 | }, 708 | { 709 | "key": "alt+SUI_选择模式 SUI_对象内部 w", 710 | "command": "extension.multiCommand.execute", 711 | "args": { 712 | "sequence": [ 713 | "cursorWordLeft", 714 | "cursorWordRightSelect", 715 | ], 716 | }, 717 | "when": "editorTextFocus && !editorHasSelection", 718 | }, 719 | { 720 | "key": "alt+SUI_选择模式 SUI_对象外部 w", 721 | "command": "extension.multiCommand.execute", 722 | "args": { 723 | "sequence": [ 724 | "cursorWordStartLeft", 725 | "cursorWordStartRightSelect", 726 | ], 727 | }, 728 | "when": "editorTextFocus && !editorHasSelection", 729 | }, 730 | { 731 | "key": "alt+SUI_选择模式 SUI_对象两边 w", 732 | "command": "extension.multiCommand.execute", 733 | "args": { 734 | "sequence": [ 735 | "cursorWordLeft", 736 | "selectby.addNewSelection", 737 | "cursorLeft", 738 | "cursorWordStartRight", 739 | ], 740 | }, 741 | "when": "editorTextFocus && !editorHasSelection", 742 | }, 743 | // big word 744 | { 745 | "key": "alt+SUI_选择模式 shift+w", 746 | "command": "extension.multiCommand.execute", 747 | "args": { 748 | "sequence": [ 749 | "metaGo.cursorSpaceWordLeft", 750 | "metaGo.cursorSpaceWordRightSelect", 751 | ], 752 | }, 753 | "when": "editorTextFocus && !editorHasSelection", 754 | }, 755 | { 756 | "key": "alt+SUI_选择模式 SUI_小左 shift+w", 757 | "command": "metaGo.cursorSpaceWordLeftSelect", 758 | "when": "editorTextFocus && !editorHasSelection", 759 | }, 760 | { 761 | "key": "alt+SUI_选择模式 SUI_小右 shift+w", 762 | "command": "metaGo.cursorSpaceWordRightSelect", 763 | "when": "editorTextFocus && !editorHasSelection", 764 | }, 765 | { 766 | "key": "alt+SUI_选择模式 SUI_对象内部 shift+w", 767 | "command": "extension.multiCommand.execute", 768 | "args": { 769 | "sequence": [ 770 | "metaGo.cursorSpaceWordLeft", 771 | "metaGo.cursorSpaceWordRightSelect", 772 | ], 773 | }, 774 | "when": "editorTextFocus && !editorHasSelection", 775 | }, 776 | { 777 | "key": "alt+SUI_选择模式 SUI_对象外部 shift+w", 778 | "command": "extension.multiCommand.execute", 779 | "args": { 780 | "sequence": [ 781 | "metaGo.cursorSpaceWordLeft", 782 | "metaGo.cursorSpaceWordRightSelect", 783 | ], 784 | }, 785 | "when": "editorTextFocus && !editorHasSelection", 786 | }, 787 | // paragraphs 788 | { 789 | "key": "alt+SUI_选择模式 p", 790 | "command": "extension.multiCommand.execute", 791 | "args": { 792 | "sequence": [ 793 | "metaGo.gotoEmptyLineUp", 794 | "metaGo.selectEmptyLineDown", 795 | ], 796 | }, 797 | "when": "editorTextFocus && !editorHasSelection", 798 | }, 799 | { 800 | "key": "alt+SUI_选择模式 SUI_小左 p", 801 | "command": "metaGo.selectEmptyLineUp", 802 | "when": "editorTextFocus && !editorHasSelection", 803 | }, 804 | { 805 | "key": "alt+SUI_选择模式 SUI_小右 p", 806 | "command": "metaGo.selectEmptyLineDown", 807 | "when": "editorTextFocus && !editorHasSelection", 808 | }, 809 | { 810 | "key": "alt+SUI_选择模式 SUI_对象内部 p", 811 | "command": "extension.multiCommand.execute", 812 | "args": { 813 | "sequence": [ 814 | "metaGo.gotoEmptyLineUp", 815 | "metaGo.selectEmptyLineDown", 816 | ], 817 | }, 818 | "when": "editorTextFocus && !editorHasSelection", 819 | }, 820 | { 821 | "key": "alt+SUI_选择模式 SUI_对象外部 p", 822 | "command": "extension.multiCommand.execute", 823 | "args": { 824 | "sequence": [ 825 | "metaGo.gotoEmptyLineUp", 826 | "metaGo.selectEmptyLineDown", 827 | ], 828 | }, 829 | "when": "editorTextFocus && !editorHasSelection", 830 | }, 831 | // line 832 | { 833 | "key": "alt+SUI_选择模式 l", 834 | "command": "extension.multiCommand.execute", 835 | "args": { 836 | "sequence": [ 837 | "cursorLineStart", 838 | "cursorLineEndSelect", 839 | ], 840 | }, 841 | "when": "editorTextFocus && !editorHasSelection", 842 | }, 843 | { 844 | "key": "alt+SUI_选择模式 SUI_小左 l", 845 | "command": "cursorLineStartSelect", 846 | "when": "editorTextFocus && !editorHasSelection", 847 | }, 848 | { 849 | "key": "alt+SUI_选择模式 SUI_小右 l", 850 | "command": "cursorLineEndSelect", 851 | "when": "editorTextFocus && !editorHasSelection", 852 | }, 853 | { 854 | "key": "alt+SUI_选择模式 SUI_对象内部 l", 855 | "command": "extension.multiCommand.execute", 856 | "args": { 857 | "sequence": [ 858 | "cursorHome", 859 | "cursorEndSelect", 860 | ], 861 | }, 862 | "when": "editorTextFocus && !editorHasSelection", 863 | }, 864 | { 865 | "key": "alt+SUI_选择模式 SUI_对象外部 l", 866 | "command": "extension.multiCommand.execute", 867 | "args": { 868 | "sequence": [ 869 | "cursorLineStart", 870 | "cursorLineEndSelect", 871 | "cursorRightSelect", 872 | ], 873 | }, 874 | "when": "editorTextFocus && !editorHasSelection", 875 | }, 876 | // bracket 877 | { 878 | "key": "alt+SUI_选择模式 b", 879 | "command": "bracketeer.selectBracketContent", 880 | "when": "editorTextFocus && !editorHasSelection", 881 | }, 882 | { 883 | "key": "alt+SUI_选择模式 SUI_对象内部 b", 884 | "command": "extension.multiCommand.execute", 885 | "args": { 886 | "sequence": [ 887 | "editor.action.selectToBracket", 888 | "cursorLeftSelect", 889 | "metaGo.selectionSwitchActiveWithAnchor", 890 | "cursorRightSelect", 891 | "metaGo.selectionSwitchActiveWithAnchor", 892 | ] 893 | }, 894 | "when": "editorTextFocus && !editorHasSelection", 895 | }, 896 | { 897 | "key": "alt+SUI_选择模式 SUI_对象外部 b", 898 | "command": "editor.action.selectToBracket", 899 | "when": "editorTextFocus && !editorHasSelection", 900 | }, 901 | { 902 | "key": "alt+c b b", 903 | "command": "bracketeer.changeBracketsTo", 904 | "when": "editorTextFocus && !editorHasSelection", 905 | }, 906 | { 907 | "key": "alt+SUI_选择模式 SUI_对象两边 b", 908 | "command": "extension.multiCommand.execute", 909 | "args": { 910 | "sequence": [ 911 | "metaGo.jumpToBracket", 912 | "cursorRight", 913 | "metaGo.jumpToBracket", 914 | "metaGo.jumpToBracket", 915 | "cursorLeft", 916 | "selectby.addNewSelection", 917 | "editor.action.jumpToBracket", 918 | "cursorRightSelect", 919 | ], 920 | }, 921 | "when": "editorTextFocus && !editorHasSelection", 922 | }, 923 | // quote 924 | { 925 | "key": "alt+SUI_选择模式 q", 926 | "command": "quickSelect.cursorQuoteSelect", 927 | "when": "editorTextFocus && !editorHasSelection", 928 | }, 929 | { 930 | "key": "alt+SUI_选择模式 SUI_小左 q", 931 | "command": "quickSelect.cursorQuoteStartSelect", 932 | "when": "editorTextFocus && !editorHasSelection", 933 | }, 934 | { 935 | "key": "alt+SUI_选择模式 SUI_小右 q", 936 | "command": "quickSelect.cursorQuoteEndSelect", 937 | "when": "editorTextFocus && !editorHasSelection", 938 | }, 939 | { 940 | "key": "alt+SUI_选择模式 SUI_对象内部 q", 941 | "command": "quickSelect.cursorQuoteSelect", 942 | "when": "editorTextFocus && !editorHasSelection", 943 | }, 944 | { 945 | "key": "alt+SUI_选择模式 SUI_对象外部 q", 946 | "command": "extension.multiCommand.execute", 947 | "args": { 948 | "sequence": [ 949 | "quickSelect.cursorQuoteStart", 950 | "quickSelect.cursorQuoteEndSelect", 951 | "cursorRightSelect", 952 | "metaGo.selectionSwitchActiveWithAnchor", 953 | "cursorLeftSelect", 954 | "metaGo.selectionSwitchActiveWithAnchor", 955 | ], 956 | }, 957 | "when": "editorTextFocus && !editorHasSelection", 958 | }, 959 | { 960 | "key": "alt+SUI_选择模式 SUI_对象两边 q", 961 | "command": "extension.multiCommand.execute", 962 | "args": { 963 | "sequence": [ 964 | "quickSelect.cursorQuoteStart", 965 | "cursorLeftSelect", 966 | "editor.action.addSelectionToNextFindMatch", 967 | ], 968 | }, 969 | "when": "editorTextFocus && !editorHasSelection", 970 | }, 971 | // universe 972 | { 973 | "key": "alt+SUI_选择模式 e", 974 | "command": "extension.multiCommand.execute", 975 | "args": { 976 | "sequence": [ 977 | "cursorTop", 978 | "cursorBottomSelect", 979 | ], 980 | }, 981 | "when": "editorTextFocus && !editorHasSelection", 982 | }, 983 | { 984 | "key": "alt+SUI_选择模式 SUI_小左 e", 985 | "command": "cursorTopSelect", 986 | "when": "editorTextFocus && !editorHasSelection", 987 | }, 988 | { 989 | "key": "alt+SUI_选择模式 SUI_小右 e", 990 | "command": "cursorBottomSelect", 991 | "when": "editorTextFocus && !editorHasSelection", 992 | }, 993 | { 994 | "key": "alt+SUI_选择模式 SUI_对象内部 e", 995 | "command": "extension.multiCommand.execute", 996 | "args": { 997 | "sequence": [ 998 | "cursorTop", 999 | "cursorBottomSelect", 1000 | ], 1001 | }, 1002 | "when": "editorTextFocus && !editorHasSelection", 1003 | }, 1004 | { 1005 | "key": "alt+SUI_选择模式 SUI_对象外部 e", 1006 | "command": "extension.multiCommand.execute", 1007 | "args": { 1008 | "sequence": [ 1009 | "cursorTop", 1010 | "cursorBottomSelect", 1011 | ], 1012 | }, 1013 | "when": "editorTextFocus && !editorHasSelection", 1014 | }, 1015 | //mod:delete d 1016 | // word 1017 | { 1018 | "key": "alt+SUI_删除 w", 1019 | "command": "extension.multiCommand.execute", 1020 | "args": { 1021 | "commands": [ 1022 | "cursorWordStartLeft", 1023 | "cursorWordStartRightSelect", 1024 | "deleteLeft", 1025 | ], 1026 | "sequence": [ 1027 | "cursorWordStartLeft", 1028 | "cursorWordStartRightSelect", 1029 | "deleteLeft", 1030 | ], 1031 | "repeat": "${getRepeatInput}", // to prompt the user for a 'repeat' number 1032 | }, 1033 | "when": "editorTextFocus", 1034 | }, 1035 | { 1036 | "key": "alt+SUI_删除 SUI_小左 w", 1037 | "command": "extension.multiCommand.execute", 1038 | "args": { 1039 | "sequence": [ 1040 | "cursorWordLeftSelect", 1041 | "deleteLeft", 1042 | ], 1043 | }, 1044 | "when": "editorTextFocus", 1045 | }, 1046 | { 1047 | "key": "alt+SUI_删除 SUI_小右 w", 1048 | "command": "extension.multiCommand.execute", 1049 | "args": { 1050 | "sequence": [ 1051 | "cursorWordRightSelect", 1052 | "deleteLeft", 1053 | ], 1054 | }, 1055 | "when": "editorTextFocus", 1056 | }, 1057 | { 1058 | "key": "alt+SUI_删除 SUI_对象内部 w", 1059 | "command": "extension.multiCommand.execute", 1060 | "args": { 1061 | "sequence": [ 1062 | "cursorWordStartLeft", 1063 | "cursorWordStartRightSelect", 1064 | "deleteLeft", 1065 | ], 1066 | }, 1067 | "when": "editorTextFocus", 1068 | }, 1069 | { 1070 | "key": "alt+SUI_删除 SUI_对象外部 w", 1071 | "command": "extension.multiCommand.execute", 1072 | "args": { 1073 | "sequence": [ 1074 | "cursorWordLeft", 1075 | "cursorWordRightSelect", 1076 | "deleteLeft", 1077 | ], 1078 | }, 1079 | "when": "editorTextFocus", 1080 | }, 1081 | // big word 1082 | { 1083 | "key": "alt+SUI_删除 shift+w", 1084 | "command": "extension.multiCommand.execute", 1085 | "args": { 1086 | "sequence": [ 1087 | "metaGo.cursorSpaceWordLeft", 1088 | "metaGo.cursorSpaceWordRightSelect", 1089 | "deleteLeft", 1090 | ], 1091 | }, 1092 | "when": "editorTextFocus", 1093 | }, 1094 | { 1095 | "key": "alt+SUI_删除 SUI_小左 shift+w", 1096 | "command": "extension.multiCommand.execute", 1097 | "args": { 1098 | "sequence": [ 1099 | "metaGo.cursorSpaceWordLeftSelect", 1100 | "deleteLeft", 1101 | ], 1102 | }, 1103 | "when": "editorTextFocus", 1104 | }, 1105 | { 1106 | "key": "alt+SUI_删除 SUI_小右 shift+w", 1107 | "command": "extension.multiCommand.execute", 1108 | "args": { 1109 | "sequence": [ 1110 | "metaGo.cursorSpaceWordRightSelect", 1111 | "deleteLeft", 1112 | ], 1113 | }, 1114 | "when": "editorTextFocus", 1115 | }, 1116 | { 1117 | "key": "alt+SUI_删除 SUI_对象内部 shift+w", 1118 | "command": "extension.multiCommand.execute", 1119 | "args": { 1120 | "sequence": [ 1121 | "metaGo.cursorSpaceWordLeft", 1122 | "metaGo.cursorSpaceWordRightSelect", 1123 | "deleteLeft", 1124 | ], 1125 | }, 1126 | "when": "editorTextFocus", 1127 | }, 1128 | { 1129 | "key": "alt+SUI_删除 SUI_对象外部 shift+w", 1130 | "command": "extension.multiCommand.execute", 1131 | "args": { 1132 | "sequence": [ 1133 | "metaGo.cursorSpaceWordLeft", 1134 | "metaGo.cursorSpaceWordRightSelect", 1135 | "deleteLeft", 1136 | ], 1137 | }, 1138 | "when": "editorTextFocus", 1139 | }, 1140 | // paragraphs 1141 | { 1142 | "key": "alt+SUI_删除 p", 1143 | "command": "extension.multiCommand.execute", 1144 | "args": { 1145 | "sequence": [ 1146 | "metaGo.gotoEmptyLineUp", 1147 | "metaGo.selectEmptyLineDown", 1148 | "deleteLeft", 1149 | ], 1150 | }, 1151 | "when": "editorTextFocus", 1152 | }, 1153 | { 1154 | "key": "alt+SUI_删除 SUI_小左 p", 1155 | "command": "extension.multiCommand.execute", 1156 | "args": { 1157 | "sequence": [ 1158 | "metaGo.selectEmptyLineUp", 1159 | "deleteLeft", 1160 | ], 1161 | }, 1162 | "when": "editorTextFocus", 1163 | }, 1164 | { 1165 | "key": "alt+SUI_删除 SUI_小右 p", 1166 | "command": "extension.multiCommand.execute", 1167 | "args": { 1168 | "sequence": [ 1169 | "metaGo.selectEmptyLineDown", 1170 | "deleteLeft", 1171 | ], 1172 | }, 1173 | "when": "editorTextFocus", 1174 | }, 1175 | { 1176 | "key": "alt+SUI_删除 SUI_对象内部 p", 1177 | "command": "extension.multiCommand.execute", 1178 | "args": { 1179 | "sequence": [ 1180 | "metaGo.gotoEmptyLineUp", 1181 | "metaGo.selectEmptyLineDown", 1182 | "deleteLeft", 1183 | ], 1184 | }, 1185 | "when": "editorTextFocus", 1186 | }, 1187 | { 1188 | "key": "alt+SUI_删除 SUI_对象外部 p", 1189 | "command": "extension.multiCommand.execute", 1190 | "args": { 1191 | "sequence": [ 1192 | "metaGo.gotoEmptyLineUp", 1193 | "metaGo.selectEmptyLineDown", 1194 | "deleteLeft", 1195 | ], 1196 | }, 1197 | "when": "editorTextFocus", 1198 | }, 1199 | // line 1200 | { 1201 | "key": "alt+SUI_删除 l", 1202 | "command": "extension.multiCommand.execute", 1203 | "args": { 1204 | "sequence": [ 1205 | "editor.action.deleteLines", 1206 | ], 1207 | }, 1208 | "when": "editorTextFocus", 1209 | }, 1210 | { 1211 | "key": "alt+SUI_删除 SUI_小左 l", 1212 | "command": "deleteAllLeft", 1213 | "when": "editorTextFocus", 1214 | }, 1215 | { 1216 | "key": "alt+SUI_删除 SUI_小右 l", 1217 | "command": "deleteAllRight", 1218 | "when": "editorTextFocus", 1219 | }, 1220 | { 1221 | "key": "alt+SUI_删除 SUI_对象内部 l", 1222 | "command": "extension.multiCommand.execute", 1223 | "args": { 1224 | "sequence": [ 1225 | "cursorHome", 1226 | "cursorEndSelect", 1227 | "deleteLeft", 1228 | ], 1229 | }, 1230 | "when": "editorTextFocus", 1231 | }, 1232 | { 1233 | "key": "alt+SUI_删除 SUI_对象外部 l", 1234 | "command": "extension.multiCommand.execute", 1235 | "args": { 1236 | "sequence": [ 1237 | "cursorLineStart", 1238 | "cursorLineEndSelect", 1239 | "deleteLeft", 1240 | ], 1241 | }, 1242 | "when": "editorTextFocus", 1243 | }, 1244 | // bracket 1245 | { 1246 | "key": "alt+SUI_删除 b", 1247 | "command": "extension.multiCommand.execute", 1248 | "args": { 1249 | "sequence": [ 1250 | "bracketeer.selectBracketContent", 1251 | "deleteLeft", 1252 | ], 1253 | }, 1254 | "when": "editorTextFocus", 1255 | }, 1256 | { 1257 | "key": "alt+SUI_删除 v b", 1258 | "command": "extension.multiCommand.execute", 1259 | "args": { 1260 | "sequence": [ 1261 | "editor.action.selectToBracket", 1262 | "editor.action.deleteLines" 1263 | ], 1264 | }, 1265 | "when": "editorTextFocus && !editorHasSelection", 1266 | }, 1267 | { 1268 | "key": "alt+SUI_拷贝 v b", 1269 | "command": "extension.multiCommand.execute", 1270 | "args": { 1271 | "sequence": [ 1272 | "editor.action.selectToBracket", 1273 | "bcjti.selectLine", 1274 | "metaGo.selectionSwitchActiveWithAnchor", 1275 | "cursorLineStartSelect", 1276 | "metaGo.selectionSwitchActiveWithAnchor", 1277 | "cursorLeftSelect", 1278 | "cursorLineEndSelect", 1279 | "cursorRightSelect", 1280 | "editor.action.clipboardCopyAction", 1281 | { 1282 | "command": "delayedcommand.run", 1283 | "args": { 1284 | "delay": 100, 1285 | "command": "cursorLeft", 1286 | }, 1287 | }, 1288 | ], 1289 | }, 1290 | "when": "editorTextFocus && !editorHasSelection", 1291 | }, 1292 | { 1293 | "key": "alt+SUI_删除 SUI_对象内部 b", 1294 | "command": "extension.multiCommand.execute", 1295 | "args": { 1296 | "sequence": [ 1297 | "bracketeer.selectBracketContent", 1298 | "deleteLeft", 1299 | ], 1300 | }, 1301 | "when": "editorTextFocus", 1302 | }, 1303 | { 1304 | "key": "alt+SUI_删除 SUI_对象外部 b", 1305 | "command": "extension.multiCommand.execute", 1306 | "args": { 1307 | "sequence": [ 1308 | "editor.action.selectToBracket", 1309 | "deleteLeft", 1310 | ], 1311 | }, 1312 | "when": "editorTextFocus", 1313 | }, 1314 | { 1315 | "key": "alt+SUI_删除 SUI_对象两边 b", 1316 | "command": "bracketeer.removeBrackets", 1317 | "when": "editorTextFocus", 1318 | }, 1319 | // quote 1320 | { 1321 | "key": "alt+SUI_删除 q", 1322 | "command": "extension.multiCommand.execute", 1323 | "args": { 1324 | "sequence": [ 1325 | "quickSelect.cursorQuoteSelect", 1326 | "deleteLeft", 1327 | ], 1328 | }, 1329 | "when": "editorTextFocus", 1330 | }, 1331 | { 1332 | "key": "alt+SUI_删除 SUI_小左 q", 1333 | "command": "extension.multiCommand.execute", 1334 | "args": { 1335 | "sequence": [ 1336 | "quickSelect.cursorQuoteStartSelect", 1337 | "deleteLeft", 1338 | ], 1339 | }, 1340 | "when": "editorTextFocus", 1341 | }, 1342 | { 1343 | "key": "alt+SUI_删除 SUI_小右 q", 1344 | "command": "extension.multiCommand.execute", 1345 | "args": { 1346 | "sequence": [ 1347 | "quickSelect.cursorQuoteEndSelect", 1348 | "deleteLeft", 1349 | ], 1350 | }, 1351 | "when": "editorTextFocus", 1352 | }, 1353 | { 1354 | "key": "alt+SUI_删除 SUI_对象内部 q", 1355 | "command": "extension.multiCommand.execute", 1356 | "args": { 1357 | "sequence": [ 1358 | "quickSelect.cursorQuoteSelect", 1359 | "deleteLeft", 1360 | ], 1361 | }, 1362 | "when": "editorTextFocus", 1363 | }, 1364 | { 1365 | "key": "alt+SUI_删除 SUI_对象外部 q", 1366 | "command": "extension.multiCommand.execute", 1367 | "args": { 1368 | "sequence": [ 1369 | "quickSelect.cursorQuoteStart", 1370 | "quickSelect.cursorQuoteEndSelect", 1371 | "cursorRightSelect", 1372 | "metaGo.selectionSwitchActiveWithAnchor", 1373 | "cursorLeftSelect", 1374 | "metaGo.selectionSwitchActiveWithAnchor", 1375 | "deleteLeft", 1376 | ], 1377 | }, 1378 | "when": "editorTextFocus", 1379 | }, 1380 | { 1381 | "key": "alt+SUI_删除 SUI_对象两边 q", 1382 | "command": "bracketeer.removeQuotes", 1383 | "when": "editorTextFocus", 1384 | }, 1385 | // universe 1386 | { 1387 | "key": "alt+SUI_删除 u", 1388 | "command": "extension.multiCommand.execute", 1389 | "args": { 1390 | "sequence": [ 1391 | "cursorTop", 1392 | "cursorBottomSelect", 1393 | "deleteLeft", 1394 | ], 1395 | }, 1396 | "when": "editorTextFocus", 1397 | }, 1398 | { 1399 | "key": "alt+SUI_删除 SUI_小左 u", 1400 | "command": "extension.multiCommand.execute", 1401 | "args": { 1402 | "sequence": [ 1403 | "cursorTopSelect", 1404 | "deleteLeft", 1405 | ], 1406 | }, 1407 | "when": "editorTextFocus", 1408 | }, 1409 | { 1410 | "key": "alt+SUI_删除 SUI_小右 u", 1411 | "command": "extension.multiCommand.execute", 1412 | "args": { 1413 | "sequence": [ 1414 | "cursorBottomSelect", 1415 | "editor.action.clipboardCopyAction", 1416 | "deleteLeft", 1417 | ], 1418 | }, 1419 | "when": "editorTextFocus", 1420 | }, 1421 | { 1422 | "key": "alt+SUI_删除 SUI_对象内部 u", 1423 | "command": "extension.multiCommand.execute", 1424 | "args": { 1425 | "sequence": [ 1426 | "cursorTop", 1427 | "cursorBottomSelect", 1428 | "deleteLeft", 1429 | ], 1430 | }, 1431 | "when": "editorTextFocus", 1432 | }, 1433 | { 1434 | "key": "alt+SUI_删除 SUI_对象外部 u", 1435 | "command": "extension.multiCommand.execute", 1436 | "args": { 1437 | "sequence": [ 1438 | "cursorTop", 1439 | "cursorBottomSelect", 1440 | "deleteLeft", 1441 | ], 1442 | }, 1443 | "when": "editorTextFocus", 1444 | }, 1445 | //mod:yank y 1446 | // word 1447 | { 1448 | "key": "alt+SUI_拷贝 w", 1449 | "command": "extension.multiCommand.execute", 1450 | "args": { 1451 | "sequence": [ 1452 | "cursorWordStartLeft", 1453 | "cursorWordStartRightSelect", 1454 | "editor.action.clipboardCopyAction", 1455 | { 1456 | "command": "delayedcommand.run", 1457 | "args": { 1458 | "delay": 100, 1459 | "command": "cursorLeft", 1460 | }, 1461 | }, 1462 | ], 1463 | }, 1464 | "when": "editorTextFocus && !editorHasSelection", 1465 | }, 1466 | { 1467 | "key": "alt+SUI_拷贝 SUI_小左 w", 1468 | "command": "extension.multiCommand.execute", 1469 | "args": { 1470 | "sequence": [ 1471 | "cursorWordLeftSelect", 1472 | "editor.action.clipboardCopyAction", 1473 | { 1474 | "command": "delayedcommand.run", 1475 | "args": { 1476 | "delay": 100, 1477 | "command": "cursorLeft", 1478 | }, 1479 | }, 1480 | ], 1481 | }, 1482 | "when": "editorTextFocus && !editorHasSelection", 1483 | }, 1484 | { 1485 | "key": "alt+SUI_拷贝 SUI_小右 w", 1486 | "command": "extension.multiCommand.execute", 1487 | "args": { 1488 | "sequence": [ 1489 | "cursorWordRightSelect", 1490 | "editor.action.clipboardCopyAction", 1491 | { 1492 | "command": "delayedcommand.run", 1493 | "args": { 1494 | "delay": 100, 1495 | "command": "cursorLeft", 1496 | }, 1497 | }, 1498 | ], 1499 | }, 1500 | "when": "editorTextFocus && !editorHasSelection", 1501 | }, 1502 | { 1503 | "key": "alt+SUI_拷贝 SUI_对象内部 w", 1504 | "command": "extension.multiCommand.execute", 1505 | "args": { 1506 | "sequence": [ 1507 | "cursorWordStartLeft", 1508 | "cursorWordStartRightSelect", 1509 | "editor.action.clipboardCopyAction", 1510 | { 1511 | "command": "delayedcommand.run", 1512 | "args": { 1513 | "delay": 100, 1514 | "command": "cursorLeft", 1515 | }, 1516 | }, 1517 | ], 1518 | }, 1519 | "when": "editorTextFocus && !editorHasSelection", 1520 | }, 1521 | { 1522 | "key": "alt+SUI_拷贝 SUI_对象外部 w", 1523 | "command": "extension.multiCommand.execute", 1524 | "args": { 1525 | "sequence": [ 1526 | "cursorWordLeft", 1527 | "cursorWordRightSelect", 1528 | "editor.action.clipboardCopyAction", 1529 | { 1530 | "command": "delayedcommand.run", 1531 | "args": { 1532 | "delay": 100, 1533 | "command": "cursorLeft", 1534 | }, 1535 | }, 1536 | ], 1537 | }, 1538 | "when": "editorTextFocus && !editorHasSelection", 1539 | }, 1540 | // big word 1541 | { 1542 | "key": "alt+SUI_拷贝 shift+w", 1543 | "command": "extension.multiCommand.execute", 1544 | "args": { 1545 | "sequence": [ 1546 | "metaGo.cursorSpaceWordLeft", 1547 | "metaGo.cursorSpaceWordRightSelect", 1548 | "editor.action.clipboardCopyAction", 1549 | { 1550 | "command": "delayedcommand.run", 1551 | "args": { 1552 | "delay": 100, 1553 | "command": "cursorLeft", 1554 | }, 1555 | }, 1556 | ], 1557 | }, 1558 | "when": "editorTextFocus && !editorHasSelection", 1559 | }, 1560 | { 1561 | "key": "alt+SUI_拷贝 SUI_小左 shift+w", 1562 | "command": "extension.multiCommand.execute", 1563 | "args": { 1564 | "sequence": [ 1565 | "metaGo.cursorSpaceWordLeftSelect", 1566 | "editor.action.clipboardCopyAction", 1567 | { 1568 | "command": "delayedcommand.run", 1569 | "args": { 1570 | "delay": 100, 1571 | "command": "cursorLeft", 1572 | }, 1573 | }, 1574 | ], 1575 | }, 1576 | "when": "editorTextFocus && !editorHasSelection", 1577 | }, 1578 | { 1579 | "key": "alt+SUI_拷贝 SUI_小右 shift+w", 1580 | "command": "extension.multiCommand.execute", 1581 | "args": { 1582 | "sequence": [ 1583 | "metaGo.cursorSpaceWordRightSelect", 1584 | "editor.action.clipboardCopyAction", 1585 | { 1586 | "command": "delayedcommand.run", 1587 | "args": { 1588 | "delay": 100, 1589 | "command": "cursorLeft", 1590 | }, 1591 | }, 1592 | ], 1593 | }, 1594 | "when": "editorTextFocus && !editorHasSelection", 1595 | }, 1596 | { 1597 | "key": "alt+SUI_拷贝 SUI_对象内部 shift+w", 1598 | "command": "extension.multiCommand.execute", 1599 | "args": { 1600 | "sequence": [ 1601 | "metaGo.cursorSpaceWordLeft", 1602 | "metaGo.cursorSpaceWordRightSelect", 1603 | "editor.action.clipboardCopyAction", 1604 | { 1605 | "command": "delayedcommand.run", 1606 | "args": { 1607 | "delay": 100, 1608 | "command": "cursorLeft", 1609 | }, 1610 | }, 1611 | ], 1612 | }, 1613 | "when": "editorTextFocus && !editorHasSelection", 1614 | }, 1615 | { 1616 | "key": "alt+SUI_拷贝 SUI_对象外部 shift+w", 1617 | "command": "extension.multiCommand.execute", 1618 | "args": { 1619 | "sequence": [ 1620 | "metaGo.cursorSpaceWordLeft", 1621 | "metaGo.cursorSpaceWordRightSelect", 1622 | "editor.action.clipboardCopyAction", 1623 | { 1624 | "command": "delayedcommand.run", 1625 | "args": { 1626 | "delay": 100, 1627 | "command": "cursorLeft", 1628 | }, 1629 | }, 1630 | ], 1631 | }, 1632 | "when": "editorTextFocus && !editorHasSelection", 1633 | }, 1634 | // paragraphs 1635 | { 1636 | "key": "alt+SUI_拷贝 p", 1637 | "command": "extension.multiCommand.execute", 1638 | "args": { 1639 | "sequence": [ 1640 | "metaGo.gotoEmptyLineUp", 1641 | "metaGo.selectEmptyLineDown", 1642 | "editor.action.clipboardCopyAction", 1643 | { 1644 | "command": "delayedcommand.run", 1645 | "args": { 1646 | "delay": 100, 1647 | "command": "cursorLeft", 1648 | }, 1649 | }, 1650 | ], 1651 | }, 1652 | "when": "editorTextFocus && !editorHasSelection", 1653 | }, 1654 | { 1655 | "key": "alt+SUI_拷贝 SUI_小左 p", 1656 | "command": "extension.multiCommand.execute", 1657 | "args": { 1658 | "sequence": [ 1659 | "metaGo.selectEmptyLineUp", 1660 | "editor.action.clipboardCopyAction", 1661 | { 1662 | "command": "delayedcommand.run", 1663 | "args": { 1664 | "delay": 100, 1665 | "command": "cursorLeft", 1666 | }, 1667 | }, 1668 | ], 1669 | }, 1670 | "when": "editorTextFocus && !editorHasSelection", 1671 | }, 1672 | { 1673 | "key": "alt+SUI_拷贝 SUI_小右 p", 1674 | "command": "extension.multiCommand.execute", 1675 | "args": { 1676 | "sequence": [ 1677 | "metaGo.selectEmptyLineDown", 1678 | "editor.action.clipboardCopyAction", 1679 | { 1680 | "command": "delayedcommand.run", 1681 | "args": { 1682 | "delay": 100, 1683 | "command": "cursorLeft", 1684 | }, 1685 | }, 1686 | ], 1687 | }, 1688 | "when": "editorTextFocus && !editorHasSelection", 1689 | }, 1690 | { 1691 | "key": "alt+SUI_拷贝 SUI_对象内部 p", 1692 | "command": "extension.multiCommand.execute", 1693 | "args": { 1694 | "sequence": [ 1695 | "metaGo.gotoEmptyLineUp", 1696 | "metaGo.selectEmptyLineDown", 1697 | "editor.action.clipboardCopyAction", 1698 | { 1699 | "command": "delayedcommand.run", 1700 | "args": { 1701 | "delay": 100, 1702 | "command": "cursorLeft", 1703 | }, 1704 | }, 1705 | ], 1706 | }, 1707 | "when": "editorTextFocus && !editorHasSelection", 1708 | }, 1709 | { 1710 | "key": "alt+SUI_拷贝 SUI_对象外部 p", 1711 | "command": "extension.multiCommand.execute", 1712 | "args": { 1713 | "sequence": [ 1714 | "metaGo.gotoEmptyLineUp", 1715 | "metaGo.selectEmptyLineDown", 1716 | "editor.action.clipboardCopyAction", 1717 | { 1718 | "command": "delayedcommand.run", 1719 | "args": { 1720 | "delay": 100, 1721 | "command": "cursorLeft", 1722 | }, 1723 | }, 1724 | ], 1725 | }, 1726 | "when": "editorTextFocus && !editorHasSelection", 1727 | }, 1728 | // line 1729 | { 1730 | "key": "alt+SUI_拷贝 l", 1731 | "command": "extension.multiCommand.execute", 1732 | "args": { 1733 | "sequence": [ 1734 | "cursorLineStart", 1735 | "cursorLineEndSelect", 1736 | "editor.action.clipboardCopyAction", 1737 | { 1738 | "command": "delayedcommand.run", 1739 | "args": { 1740 | "delay": 100, 1741 | "command": "cursorLeft", 1742 | }, 1743 | }, 1744 | ], 1745 | }, 1746 | "when": "editorTextFocus && !editorHasSelection", 1747 | }, 1748 | { 1749 | "key": "alt+SUI_拷贝 y", 1750 | "command": "extension.multiCommand.execute", 1751 | "args": { 1752 | "sequence": [ 1753 | "cursorLineStart", 1754 | "cursorLineEndSelect", 1755 | "editor.action.clipboardCopyAction", 1756 | { 1757 | "command": "delayedcommand.run", 1758 | "args": { 1759 | "delay": 100, 1760 | "command": "cursorLeft", 1761 | }, 1762 | }, 1763 | ], 1764 | }, 1765 | "when": "editorTextFocus && !editorHasSelection", 1766 | }, 1767 | { 1768 | "key": "alt+SUI_拷贝 SUI_对象外部lt+y", 1769 | "command": "extension.multiCommand.execute", 1770 | "args": { 1771 | "sequence": [ 1772 | "cursorLineStart", 1773 | "cursorLineEndSelect", 1774 | "editor.action.clipboardCopyAction", 1775 | { 1776 | "command": "delayedcommand.run", 1777 | "args": { 1778 | "delay": 100, 1779 | "command": "cursorLeft", 1780 | }, 1781 | }, 1782 | ], 1783 | }, 1784 | "when": "editorTextFocus && !editorHasSelection", 1785 | }, 1786 | { 1787 | "key": "alt+SUI_拷贝 SUI_小左 l", 1788 | "command": "extension.multiCommand.execute", 1789 | "args": { 1790 | "sequence": [ 1791 | "cursorHomeSelect", 1792 | "editor.action.clipboardCopyAction", 1793 | { 1794 | "command": "delayedcommand.run", 1795 | "args": { 1796 | "delay": 100, 1797 | "command": "cursorLeft", 1798 | }, 1799 | }, 1800 | ], 1801 | }, 1802 | "when": "editorTextFocus && !editorHasSelection", 1803 | }, 1804 | { 1805 | "key": "alt+SUI_拷贝 SUI_小右 l", 1806 | "command": "extension.multiCommand.execute", 1807 | "args": { 1808 | "sequence": [ 1809 | "cursorEndSelect", 1810 | "editor.action.clipboardCopyAction", 1811 | { 1812 | "command": "delayedcommand.run", 1813 | "args": { 1814 | "delay": 100, 1815 | "command": "cursorLeft", 1816 | }, 1817 | }, 1818 | ], 1819 | }, 1820 | "when": "editorTextFocus && !editorHasSelection", 1821 | }, 1822 | { 1823 | "key": "alt+SUI_拷贝 SUI_对象内部 l", 1824 | "command": "extension.multiCommand.execute", 1825 | "args": { 1826 | "sequence": [ 1827 | "cursorHome", 1828 | "cursorEndSelect", 1829 | "editor.action.clipboardCopyAction", 1830 | { 1831 | "command": "delayedcommand.run", 1832 | "args": { 1833 | "delay": 100, 1834 | "command": "cursorLeft", 1835 | }, 1836 | }, 1837 | ], 1838 | }, 1839 | "when": "editorTextFocus && !editorHasSelection", 1840 | }, 1841 | { 1842 | "key": "alt+SUI_拷贝 SUI_对象外部 l", 1843 | "command": "extension.multiCommand.execute", 1844 | "args": { 1845 | "sequence": [ 1846 | "cursorLineStart", 1847 | "cursorLineEndSelect", 1848 | "cursorRightSelect", 1849 | "editor.action.clipboardCopyAction", 1850 | { 1851 | "command": "delayedcommand.run", 1852 | "args": { 1853 | "delay": 100, 1854 | "command": "cursorLeft", 1855 | }, 1856 | }, 1857 | ], 1858 | }, 1859 | "when": "editorTextFocus && !editorHasSelection", 1860 | }, 1861 | // bracket 1862 | { 1863 | "key": "alt+SUI_拷贝 b", 1864 | "command": "extension.multiCommand.execute", 1865 | "args": { 1866 | "sequence": [ 1867 | "bracketeer.selectBracketContent", 1868 | "editor.action.clipboardCopyAction", 1869 | { 1870 | "command": "delayedcommand.run", 1871 | "args": { 1872 | "delay": 100, 1873 | "command": "cursorLeft", 1874 | }, 1875 | }, 1876 | ], 1877 | }, 1878 | "when": "editorTextFocus && !editorHasSelection", 1879 | }, 1880 | { 1881 | "key": "alt+SUI_拷贝 SUI_对象内部 b", 1882 | "command": "extension.multiCommand.execute", 1883 | "args": { 1884 | "sequence": [ 1885 | "bracketeer.selectBracketContent", 1886 | "editor.action.clipboardCopyAction", 1887 | { 1888 | "command": "delayedcommand.run", 1889 | "args": { 1890 | "delay": 100, 1891 | "command": "cursorLeft", 1892 | }, 1893 | }, 1894 | ], 1895 | }, 1896 | "when": "editorTextFocus && !editorHasSelection", 1897 | }, 1898 | { 1899 | "key": "alt+SUI_拷贝 SUI_对象外部 b", 1900 | "command": "extension.multiCommand.execute", 1901 | "args": { 1902 | "sequence": [ 1903 | "editor.action.selectToBracket", 1904 | "editor.action.clipboardCopyAction", 1905 | { 1906 | "command": "delayedcommand.run", 1907 | "args": { 1908 | "delay": 100, 1909 | "command": "cursorLeft", 1910 | }, 1911 | }, 1912 | ], 1913 | }, 1914 | "when": "editorTextFocus && !editorHasSelection", 1915 | }, 1916 | // quote 1917 | { 1918 | "key": "alt+SUI_拷贝 q", 1919 | "command": "extension.multiCommand.execute", 1920 | "args": { 1921 | "sequence": [ 1922 | "quickSelect.cursorQuoteSelect", 1923 | "editor.action.clipboardCopyAction", 1924 | { 1925 | "command": "delayedcommand.run", 1926 | "args": { 1927 | "delay": 100, 1928 | "command": "cursorLeft", 1929 | }, 1930 | }, 1931 | ], 1932 | }, 1933 | "when": "editorTextFocus && !editorHasSelection", 1934 | }, 1935 | { 1936 | "key": "alt+SUI_拷贝 SUI_小左 q", 1937 | "command": "extension.multiCommand.execute", 1938 | "args": { 1939 | "sequence": [ 1940 | "quickSelect.cursorQuoteStartSelect", 1941 | "editor.action.clipboardCopyAction", 1942 | { 1943 | "command": "delayedcommand.run", 1944 | "args": { 1945 | "delay": 100, 1946 | "command": "cursorLeft", 1947 | }, 1948 | }, 1949 | ], 1950 | }, 1951 | "when": "editorTextFocus && !editorHasSelection", 1952 | }, 1953 | { 1954 | "key": "alt+SUI_拷贝 SUI_小右 q", 1955 | "command": "extension.multiCommand.execute", 1956 | "args": { 1957 | "sequence": [ 1958 | "quickSelect.cursorQuoteEndSelect", 1959 | "editor.action.clipboardCopyAction", 1960 | { 1961 | "command": "delayedcommand.run", 1962 | "args": { 1963 | "delay": 100, 1964 | "command": "cursorLeft", 1965 | }, 1966 | }, 1967 | ], 1968 | }, 1969 | "when": "editorTextFocus && !editorHasSelection", 1970 | }, 1971 | { 1972 | "key": "alt+SUI_拷贝 SUI_对象内部 q", 1973 | "command": "extension.multiCommand.execute", 1974 | "args": { 1975 | "sequence": [ 1976 | "quickSelect.cursorQuoteSelect", 1977 | "editor.action.clipboardCopyAction", 1978 | { 1979 | "command": "delayedcommand.run", 1980 | "args": { 1981 | "delay": 100, 1982 | "command": "cursorLeft", 1983 | }, 1984 | }, 1985 | ], 1986 | }, 1987 | "when": "editorTextFocus && !editorHasSelection", 1988 | }, 1989 | { 1990 | "key": "alt+SUI_拷贝 SUI_对象外部 q", 1991 | "command": "extension.multiCommand.execute", 1992 | "args": { 1993 | "sequence": [ 1994 | "quickSelect.cursorQuoteStart", 1995 | "quickSelect.cursorQuoteEndSelect", 1996 | "cursorRightSelect", 1997 | "metaGo.selectionSwitchActiveWithAnchor", 1998 | "cursorLeftSelect", 1999 | "metaGo.selectionSwitchActiveWithAnchor", 2000 | "editor.action.clipboardCopyAction", 2001 | { 2002 | "command": "delayedcommand.run", 2003 | "args": { 2004 | "delay": 100, 2005 | "command": "cursorLeft", 2006 | }, 2007 | }, 2008 | ], 2009 | }, 2010 | "when": "editorTextFocus && !editorHasSelection", 2011 | }, 2012 | // universe 2013 | { 2014 | "key": "alt+SUI_拷贝 u", 2015 | "command": "extension.multiCommand.execute", 2016 | "args": { 2017 | "sequence": [ 2018 | "cursorTop", 2019 | "cursorBottomSelect", 2020 | "editor.action.clipboardCopyAction", 2021 | { 2022 | "command": "delayedcommand.run", 2023 | "args": { 2024 | "delay": 100, 2025 | "command": "cursorLeft", 2026 | }, 2027 | }, 2028 | ], 2029 | }, 2030 | "when": "editorTextFocus && !editorHasSelection", 2031 | }, 2032 | { 2033 | "key": "alt+SUI_拷贝 SUI_小左 u", 2034 | "command": "extension.multiCommand.execute", 2035 | "args": { 2036 | "sequence": [ 2037 | "cursorTopSelect", 2038 | "editor.action.clipboardCopyAction", 2039 | { 2040 | "command": "delayedcommand.run", 2041 | "args": { 2042 | "delay": 100, 2043 | "command": "cursorLeft", 2044 | }, 2045 | }, 2046 | ], 2047 | }, 2048 | "when": "editorTextFocus && !editorHasSelection", 2049 | }, 2050 | { 2051 | "key": "alt+SUI_拷贝 SUI_小右 u", 2052 | "command": "extension.multiCommand.execute", 2053 | "args": { 2054 | "sequence": [ 2055 | "cursorBottomSelect", 2056 | "editor.action.clipboardCopyAction", 2057 | { 2058 | "command": "delayedcommand.run", 2059 | "args": { 2060 | "delay": 100, 2061 | "command": "cursorLeft", 2062 | }, 2063 | }, 2064 | ], 2065 | }, 2066 | "when": "editorTextFocus && !editorHasSelection", 2067 | }, 2068 | { 2069 | "key": "alt+SUI_拷贝 SUI_对象内部 u", 2070 | "command": "extension.multiCommand.execute", 2071 | "args": { 2072 | "sequence": [ 2073 | "cursorTop", 2074 | "cursorBottomSelect", 2075 | "editor.action.clipboardCopyAction", 2076 | { 2077 | "command": "delayedcommand.run", 2078 | "args": { 2079 | "delay": 100, 2080 | "command": "cursorLeft", 2081 | }, 2082 | }, 2083 | ], 2084 | }, 2085 | "when": "editorTextFocus && !editorHasSelection", 2086 | }, 2087 | { 2088 | "key": "alt+SUI_拷贝 SUI_对象外部 u", 2089 | "command": "extension.multiCommand.execute", 2090 | "args": { 2091 | "sequence": [ 2092 | "cursorTop", 2093 | "cursorBottomSelect", 2094 | "editor.action.clipboardCopyAction", 2095 | { 2096 | "command": "delayedcommand.run", 2097 | "args": { 2098 | "delay": 100, 2099 | "command": "cursorLeft", 2100 | }, 2101 | }, 2102 | ], 2103 | }, 2104 | "when": "editorTextFocus && !editorHasSelection", 2105 | }, 2106 | //mod:comment gc 2107 | { 2108 | "key": "alt+SUI_直跳 c", 2109 | "command": "extension.multiCommand.execute", 2110 | "args": { 2111 | "sequence": [ 2112 | "editor.action.commentLine", 2113 | ], 2114 | }, 2115 | "when": "editorTextFocus && !editorReadonly && editorHasSelection", 2116 | }, 2117 | { 2118 | "key": "alt+SUI_直跳 c w", 2119 | "command": "extension.multiCommand.execute", 2120 | "args": { 2121 | "sequence": [ 2122 | "cursorWordStartLeft", 2123 | "cursorWordStartRightSelect", 2124 | "editor.action.blockComment", 2125 | ], 2126 | }, 2127 | "when": "editorTextFocus && !editorReadonly", 2128 | }, 2129 | { 2130 | "key": "alt+SUI_直跳 c b", 2131 | "command": "extension.multiCommand.execute", 2132 | "args": { 2133 | "sequence": [ 2134 | "bracketeer.selectBracketContent", 2135 | "editor.action.blockComment", 2136 | ], 2137 | }, 2138 | "when": "editorTextFocus && !editorReadonly", 2139 | }, 2140 | { 2141 | "key": "alt+SUI_直跳 c l", 2142 | "command": "extension.multiCommand.execute", 2143 | "args": { 2144 | "sequence": [ 2145 | "editor.action.commentLine", 2146 | ], 2147 | }, 2148 | "when": "editorTextFocus && !editorReadonly", 2149 | }, 2150 | { 2151 | "key": "alt+SUI_直跳 c c", 2152 | "command": "extension.multiCommand.execute", 2153 | "args": { 2154 | "sequence": [ 2155 | "editor.action.commentLine", 2156 | ], 2157 | }, 2158 | "when": "editorTextFocus && !editorReadonly", 2159 | }, 2160 | //mod:copydown cd code format 2161 | { 2162 | "key": "alt+SUI_小下", 2163 | "command": "editor.action.copyLinesDownAction", 2164 | "when": "editorTextFocus && !editorReadonly && editorHasSelection", 2165 | }, 2166 | { 2167 | "key": "alt+SUI_小上", 2168 | "command": "editor.action.copyLinesUpAction", 2169 | "when": "editorTextFocus && !editorReadonly && editorHasSelection", 2170 | }, 2171 | { 2172 | "key": "alt+shift+i", 2173 | "command": "editor.action.moveLinesDownAction", 2174 | "when": "editorTextFocus && !editorReadonly", 2175 | }, 2176 | { 2177 | "key": "alt+shift+r", 2178 | "command": "editor.action.moveLinesUpAction", 2179 | "when": "editorTextFocus && !editorReadonly ", 2180 | }, 2181 | { 2182 | "key": "alt+u", 2183 | "command": "undo", 2184 | "when": "editorTextFocus && !editorReadonly", 2185 | }, 2186 | { 2187 | "key": "alt+shift+u", 2188 | "command": "redo", 2189 | "when": "editorTextFocus && !editorReadonly", 2190 | }, 2191 | // todo 2192 | //mod:upercase gu gU CamelCase 2193 | //mod:align ga 2194 | { 2195 | "key": "alt+SUI_移动 l", 2196 | "command": "extension.multiCommand.execute", 2197 | "args": { 2198 | "sequence": [ 2199 | { 2200 | "command": "editor.actions.findWithArgs", 2201 | "args": { 2202 | "searchString": "", 2203 | "replaceString": "", 2204 | }, 2205 | } 2206 | ], 2207 | }, 2208 | "when": "editorTextFocus && !editorHasSelection", 2209 | }, 2210 | { 2211 | "key": "alt+SUI_移动 w", 2212 | "command": "extension.multiCommand.execute", 2213 | "args": { 2214 | "sequence": [ 2215 | { 2216 | "command": "actions.findWithSelection", 2217 | }, 2218 | ], 2219 | }, 2220 | "when": "editorTextFocus && !editorHasSelection", 2221 | }, 2222 | { 2223 | "key": "alt+SUI_移动 q", 2224 | "command": "do what you like", 2225 | "when": "editorTextFocus && !editorHasSelection", 2226 | }, 2227 | { 2228 | "key": "alt+SUI_移动 b", 2229 | "command": "do what you like", 2230 | "when": "editorTextFocus && !editorHasSelection", 2231 | }, 2232 | { 2233 | "key": "alt+SUI_移动 f", 2234 | "command": "do what you like", 2235 | "when": "editorTextFocus && !editorHasSelection", 2236 | }, 2237 | //mod:find s(selection) cw cl cf pw pl pf vw vl vf w l f b q cb cq pb pq vb r vq 2238 | // layer(selection, currentfile, dir, project, vm) what (quote, bracket, word, line, file) other 2239 | { 2240 | "key": "alt+SUI_移动 s", 2241 | "command": "extension.multiCommand.execute", 2242 | "args": { 2243 | "sequence": [ 2244 | { 2245 | "command": "editor.actions.findWithArgs", 2246 | "args": { 2247 | "searchString": "", 2248 | "replaceString": "", 2249 | }, 2250 | }, 2251 | "toggleFindInSelection", 2252 | ], 2253 | }, 2254 | "when": "editorTextFocus && editorHasSelection", 2255 | }, 2256 | { 2257 | "key": "alt+SUI_移动 c", 2258 | "command": "extension.multiCommand.execute", 2259 | "args": { 2260 | "sequence": [ 2261 | { 2262 | "command": "actions.findWithSelection", 2263 | }, 2264 | ], 2265 | }, 2266 | "when": "editorTextFocus && editorHasSelection", 2267 | }, 2268 | { 2269 | "key": "alt+SUI_移动 c w", 2270 | "command": "extension.multiCommand.execute", 2271 | "args": { 2272 | "sequence": [ 2273 | "cursorWordStartLeft", 2274 | "cursorWordStartRightSelect", 2275 | { 2276 | "command": "actions.findWithSelection", 2277 | "args": { 2278 | "replaceString": "", 2279 | }, 2280 | }, 2281 | ], 2282 | }, 2283 | "when": "editorTextFocus && !editorHasSelection", 2284 | }, 2285 | { 2286 | "key": "alt+SUI_移动 r c w", 2287 | "command": "extension.multiCommand.execute", 2288 | "args": { 2289 | "sequence": [ 2290 | "cursorWordStartLeft", 2291 | "cursorWordStartRightSelect", 2292 | { 2293 | "command": "editor.action.startFindReplaceAction", 2294 | }, 2295 | ], 2296 | }, 2297 | "when": "editorTextFocus && !editorHasSelection", 2298 | }, 2299 | { 2300 | "key": "alt+SUI_移动 c q", 2301 | "command": "extension.multiCommand.execute", 2302 | "args": { 2303 | "sequence": [ 2304 | "quickSelect.cursorQuoteStart", 2305 | "quickSelect.cursorQuoteEndSelect", 2306 | "cursorRightSelect", 2307 | "metaGo.selectionSwitchActiveWithAnchor", 2308 | "cursorLeftSelect", 2309 | "metaGo.selectionSwitchActiveWithAnchor", 2310 | { 2311 | "command": "actions.findWithSelection", 2312 | } 2313 | ], 2314 | }, 2315 | "when": "editorTextFocus && !editorHasSelection", 2316 | }, 2317 | { 2318 | "key": "alt+SUI_移动 c b", 2319 | "command": "extension.multiCommand.execute", 2320 | "args": { 2321 | "sequence": [ 2322 | "bracketeer.selectBracketContent", 2323 | "cursorRightSelect", 2324 | "metaGo.selectionSwitchActiveWithAnchor", 2325 | "cursorLeftSelect", 2326 | "metaGo.selectionSwitchActiveWithAnchor", 2327 | { 2328 | "command": "actions.findWithSelection", 2329 | "args": { 2330 | "replaceString": "", 2331 | }, 2332 | } 2333 | ], 2334 | }, 2335 | "when": "editorTextFocus && !editorHasSelection", 2336 | }, 2337 | { 2338 | "key": "alt+SUI_移动 c l", 2339 | "command": "extension.multiCommand.execute", 2340 | "args": { 2341 | "sequence": [ 2342 | { 2343 | "command": "editor.actions.findWithArgs", 2344 | "args": { 2345 | "searchString": "", 2346 | "replaceString": "", 2347 | }, 2348 | } 2349 | ], 2350 | }, 2351 | "when": "editorTextFocus && !editorHasSelection", 2352 | }, 2353 | { 2354 | "key": "alt+SUI_移动 d", 2355 | "command": "extension.multiCommand.execute", 2356 | "args": { 2357 | "sequence": [ 2358 | { 2359 | "command": "workbench.action.findInFiles", 2360 | "args": { 2361 | "replace": "", 2362 | "isRegex": true, 2363 | "filesToInclude": "${fileDirname}/**", 2364 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2365 | }, 2366 | } 2367 | ], 2368 | }, 2369 | "when": "editorTextFocus && editorHasSelection", 2370 | }, 2371 | { 2372 | "key": "alt+SUI_移动 d w", 2373 | "command": "extension.multiCommand.execute", 2374 | "args": { 2375 | "sequence": [ 2376 | "cursorWordStartLeft", 2377 | "cursorWordStartRightSelect", 2378 | { 2379 | "command": "workbench.action.findInFiles", 2380 | "args": { 2381 | "replace": "", 2382 | "isRegex": true, 2383 | "filesToInclude": "${fileDirname}/**", 2384 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2385 | }, 2386 | } 2387 | ], 2388 | }, 2389 | "when": "editorTextFocus && !editorHasSelection", 2390 | }, 2391 | { 2392 | "key": "alt+SUI_移动 d q", 2393 | "command": "extension.multiCommand.execute", 2394 | "args": { 2395 | "sequence": [ 2396 | "quickSelect.cursorQuoteStart", 2397 | "quickSelect.cursorQuoteEndSelect", 2398 | "cursorRightSelect", 2399 | "metaGo.selectionSwitchActiveWithAnchor", 2400 | "cursorLeftSelect", 2401 | "metaGo.selectionSwitchActiveWithAnchor", 2402 | { 2403 | "command": "workbench.action.findInFiles", 2404 | "args": { 2405 | "replace": "", 2406 | "isRegex": true, 2407 | "filesToInclude": "${fileDirname}/**", 2408 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2409 | }, 2410 | } 2411 | ], 2412 | }, 2413 | "when": "editorTextFocus && !editorHasSelection", 2414 | }, 2415 | { 2416 | "key": "alt+SUI_移动 d b", 2417 | "command": "extension.multiCommand.execute", 2418 | "args": { 2419 | "sequence": [ 2420 | "editor.action.selectToBracket", 2421 | { 2422 | "command": "workbench.action.findInFiles", 2423 | "args": { 2424 | "replace": "", 2425 | "isRegex": true, 2426 | "filesToInclude": "${fileDirname}/**", 2427 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2428 | }, 2429 | } 2430 | ], 2431 | }, 2432 | "when": "editorTextFocus && !editorHasSelection", 2433 | }, 2434 | { 2435 | "key": "alt+SUI_移动 d l", 2436 | "command": "extension.multiCommand.execute", 2437 | "args": { 2438 | "sequence": [ 2439 | { 2440 | "command": "workbench.action.findInFiles", 2441 | "args": { 2442 | "replace": "", 2443 | "query": "", 2444 | "isRegex": true, 2445 | "filesToInclude": "${fileDirname}/**", 2446 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2447 | }, 2448 | } 2449 | ], 2450 | }, 2451 | "when": "editorTextFocus && !editorHasSelection", 2452 | }, 2453 | //mp "filesToInclude": "${workspaceFolder}/**", 2454 | { 2455 | "key": "alt+SUI_移动 p", 2456 | "command": "extension.multiCommand.execute", 2457 | "args": { 2458 | "sequence": [ 2459 | { 2460 | "command": "workbench.action.findInFiles", 2461 | "args": { 2462 | "replace": "", 2463 | "isRegex": true, 2464 | "filesToInclude": "${workspaceFolder}/**", 2465 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2466 | }, 2467 | } 2468 | ], 2469 | }, 2470 | "when": "editorTextFocus && editorHasSelection", 2471 | }, 2472 | { 2473 | "key": "alt+SUI_移动 p w", 2474 | "command": "extension.multiCommand.execute", 2475 | "args": { 2476 | "sequence": [ 2477 | "cursorWordStartLeft", 2478 | "cursorWordStartRightSelect", 2479 | { 2480 | "command": "workbench.action.findInFiles", 2481 | "args": { 2482 | "replace": "", 2483 | "isRegex": true, 2484 | "filesToInclude": "${workspaceFolder}/**", 2485 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2486 | }, 2487 | } 2488 | ], 2489 | }, 2490 | "when": "editorTextFocus && !editorHasSelection", 2491 | }, 2492 | { 2493 | "key": "alt+SUI_移动 p q", 2494 | "command": "extension.multiCommand.execute", 2495 | "args": { 2496 | "sequence": [ 2497 | "quickSelect.cursorQuoteStart", 2498 | "quickSelect.cursorQuoteEndSelect", 2499 | "cursorRightSelect", 2500 | "metaGo.selectionSwitchActiveWithAnchor", 2501 | "cursorLeftSelect", 2502 | "metaGo.selectionSwitchActiveWithAnchor", 2503 | { 2504 | "command": "workbench.action.findInFiles", 2505 | "args": { 2506 | "replace": "", 2507 | "isRegex": true, 2508 | "filesToInclude": "${workspaceFolder}/**", 2509 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2510 | }, 2511 | } 2512 | ], 2513 | }, 2514 | "when": "editorTextFocus && !editorHasSelection", 2515 | }, 2516 | { 2517 | "key": "alt+SUI_移动 p b", 2518 | "command": "extension.multiCommand.execute", 2519 | "args": { 2520 | "sequence": [ 2521 | "editor.action.selectToBracket", 2522 | { 2523 | "command": "workbench.action.findInFiles", 2524 | "args": { 2525 | "replace": "", 2526 | "isRegex": true, 2527 | "filesToInclude": "${workspaceFolder}/**", 2528 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2529 | }, 2530 | } 2531 | ], 2532 | }, 2533 | "when": "editorTextFocus && !editorHasSelection", 2534 | }, 2535 | { 2536 | "key": "alt+SUI_移动 p l", 2537 | "command": "extension.multiCommand.execute", 2538 | "args": { 2539 | "sequence": [ 2540 | { 2541 | "command": "workbench.action.findInFiles", 2542 | "args": { 2543 | "replace": "", 2544 | "query": "", 2545 | "isRegex": true, 2546 | "filesToInclude": "${workspaceFolder}/**", 2547 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2548 | }, 2549 | } 2550 | ], 2551 | }, 2552 | "when": "editorTextFocus && !editorHasSelection", 2553 | }, 2554 | //mv "filesToInclude": "", 2555 | { 2556 | "key": "alt+SUI_移动 v", 2557 | "command": "extension.multiCommand.execute", 2558 | "args": { 2559 | "sequence": [ 2560 | { 2561 | "command": "workbench.action.findInFiles", 2562 | "args": { 2563 | "replace": "", 2564 | "isRegex": true, 2565 | "filesToInclude": "", 2566 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2567 | }, 2568 | } 2569 | ], 2570 | }, 2571 | "when": "editorTextFocus && editorHasSelection", 2572 | }, 2573 | { 2574 | "key": "alt+SUI_移动 v w", 2575 | "command": "extension.multiCommand.execute", 2576 | "args": { 2577 | "sequence": [ 2578 | "cursorWordStartLeft", 2579 | "cursorWordStartRightSelect", 2580 | { 2581 | "command": "workbench.action.findInFiles", 2582 | "args": { 2583 | "replace": "", 2584 | "isRegex": true, 2585 | "filesToInclude": "", 2586 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2587 | }, 2588 | } 2589 | ], 2590 | }, 2591 | "when": "editorTextFocus && !editorHasSelection", 2592 | }, 2593 | { 2594 | "key": "alt+SUI_移动 v q", 2595 | "command": "extension.multiCommand.execute", 2596 | "args": { 2597 | "sequence": [ 2598 | "quickSelect.cursorQuoteStart", 2599 | "quickSelect.cursorQuoteEndSelect", 2600 | "cursorRightSelect", 2601 | "metaGo.selectionSwitchActiveWithAnchor", 2602 | "cursorLeftSelect", 2603 | "metaGo.selectionSwitchActiveWithAnchor", 2604 | { 2605 | "command": "workbench.action.findInFiles", 2606 | "args": { 2607 | "replace": "", 2608 | "isRegex": true, 2609 | "filesToInclude": "", 2610 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2611 | }, 2612 | } 2613 | ], 2614 | }, 2615 | "when": "editorTextFocus && !editorHasSelection", 2616 | }, 2617 | { 2618 | "key": "alt+SUI_移动 v b", 2619 | "command": "extension.multiCommand.execute", 2620 | "args": { 2621 | "sequence": [ 2622 | "editor.action.selectToBracket", 2623 | { 2624 | "command": "workbench.action.findInFiles", 2625 | "args": { 2626 | "replace": "", 2627 | "isRegex": true, 2628 | "filesToInclude": "", 2629 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2630 | }, 2631 | } 2632 | ], 2633 | }, 2634 | "when": "editorTextFocus && !editorHasSelection", 2635 | }, 2636 | { 2637 | "key": "alt+SUI_移动 v l", 2638 | "command": "extension.multiCommand.execute", 2639 | "args": { 2640 | "sequence": [ 2641 | { 2642 | "command": "workbench.action.findInFiles", 2643 | "args": { 2644 | "replace": "", 2645 | "query": "", 2646 | "isRegex": true, 2647 | "filesToInclude": "", 2648 | "filesToExclude": "*.exe,*.zip,*.msi,*.appimage,*.meta", 2649 | }, 2650 | } 2651 | ], 2652 | }, 2653 | "when": "editorTextFocus && !editorHasSelection", 2654 | }, 2655 | // todo df pf vf 2656 | { 2657 | "key": "alt+SUI_移动 f", 2658 | "command": "extension.multiCommand.execute", 2659 | "args": { 2660 | "sequence": [ 2661 | { 2662 | "command": "workbench.action.quickOpen", 2663 | } 2664 | ], 2665 | }, 2666 | "when": "editorTextFocus && !editorHasSelection", 2667 | }, 2668 | // symbol sf, sc , s 2669 | { 2670 | "key": "alt+SUI_移动 s", 2671 | "command": "extension.multiCommand.execute", 2672 | "args": { 2673 | "sequence": [ 2674 | { 2675 | "command": "workbench.action.showAllSymbols", 2676 | }, 2677 | ], 2678 | }, 2679 | "when": "editorTextFocus && !editorHasSelection", 2680 | }, 2681 | // 2682 | { 2683 | "key": "alt+SUI_移动 o f", 2684 | "command": "extension.multiCommand.execute", 2685 | "args": { 2686 | "sequence": [ 2687 | { 2688 | "command": "workbench.action.showAllEditors", 2689 | }, 2690 | ], 2691 | }, 2692 | "when": "editorTextFocus && !editorHasSelection", 2693 | }, 2694 | { 2695 | "key": "alt+SUI_移动 o r", 2696 | "command": "extension.multiCommand.execute", 2697 | "args": { 2698 | "sequence": [ 2699 | { 2700 | "command": "workbench.action.showAllEditorsByMostRecentlyUsed", 2701 | }, 2702 | ], 2703 | }, 2704 | "when": "editorTextFocus && !editorHasSelection", 2705 | }, 2706 | //code action 2707 | { 2708 | "key": "alt+c f", 2709 | "command": "editor.action.formatDocument", 2710 | "when": "editorTextFocus", 2711 | }, 2712 | { 2713 | "key": "alt+c a", 2714 | "command": "editor.action.quickFix", 2715 | "when": "editorTextFocus", 2716 | }, 2717 | // goto some where 2718 | { 2719 | "key": "alt+SUI_小上", 2720 | "command": "extension.multiCommand.execute", 2721 | "args": { 2722 | "sequence": [ 2723 | "editor.action.previousMatchFindAction", 2724 | ], 2725 | }, 2726 | "when": "editorFocus && findWidgetVisible", 2727 | }, 2728 | { 2729 | "key": "alt+SUI_小下", 2730 | "command": "editor.action.nextMatchFindAction", 2731 | "when": "editorFocus && findWidgetVisible", 2732 | }, 2733 | { 2734 | "key": "alt+SUI_小上", 2735 | "command": "extension.multiCommand.execute", 2736 | "args": { 2737 | "sequence": [ 2738 | "search.focus.previousInputBox", 2739 | ], 2740 | }, 2741 | "when": "inSearchEditor && inputBoxFocus || inputBoxFocus && searchViewletVisible" 2742 | }, 2743 | { 2744 | "key": "alt+SUI_小上", 2745 | "command": "extension.multiCommand.execute", 2746 | "args": { 2747 | "sequence": [ 2748 | "search.action.focusSearchFromResults", 2749 | ], 2750 | }, 2751 | "when": "accessibilityModeEnabled && searchViewletVisible || firstMatchFocus && searchViewletVisible" 2752 | }, 2753 | { 2754 | "key": "alt+SUI_小下", 2755 | "command": "search.focus.nextInputBox", 2756 | "when": "inSearchEditor && inputBoxFocus || inputBoxFocus && searchViewletVisible" 2757 | }, 2758 | // copy other 2759 | { 2760 | "key": "alt+SUI_拷贝 o i", 2761 | "command": "copy-filepath-with-line-number", 2762 | "when": "editorTextFocus && !editorHasSelection", 2763 | }, 2764 | { 2765 | "key": "alt+SUI_拷贝 o n", 2766 | "command": "copy-file-directory.copyFileNameWithExtension", 2767 | "when": "editorTextFocus && !editorHasSelection", 2768 | }, 2769 | { 2770 | "key": "alt+SUI_拷贝 o d", 2771 | "command": "copy-file-directory.copyFileDirectory", 2772 | "when": "editorTextFocus && !editorHasSelection", 2773 | }, 2774 | { 2775 | "key": "alt+SUI_拷贝 o p", 2776 | "command": "copyFilePath", 2777 | "when": "editorTextFocus && !editorHasSelection", 2778 | }, 2779 | { 2780 | "key": "alt+SUI_直跳 w", 2781 | "command": "editor.action.openLink", 2782 | "when": "editorTextFocus", 2783 | }, 2784 | { 2785 | "key": "alt+c r", 2786 | "command": "editor.action.rename", 2787 | "when": "editorTextFocus", 2788 | }, 2789 | { 2790 | "key": "alt+c e", 2791 | "command": "go.godoctor.extract", 2792 | "when": "editorTextFocus && editorLangId == 'go'", 2793 | }, 2794 | { 2795 | "key": "alt+SUI_直跳 i", 2796 | "command": "editor.action.dirtydiff.next", 2797 | "when": "editorTextFocus && !textCompareEditorActive" 2798 | }, 2799 | { 2800 | "key": "alt+SUI_直跳 i", 2801 | "command": "workbench.action.editor.nextChange", 2802 | "when": "editorTextFocus && !textCompareEditorActive" 2803 | }, 2804 | { 2805 | "key": "alt+SUI_直跳 i", 2806 | "command": "workbench.action.compareEditor.nextChange", 2807 | "when": "textCompareEditorVisible" 2808 | }, 2809 | { 2810 | "key": "alt+SUI_直跳 r", 2811 | "command": "editor.action.dirtydiff.previous", 2812 | "when": "editorTextFocus && !textCompareEditorActive" 2813 | }, 2814 | { 2815 | "key": "alt+SUI_直跳 r", 2816 | "command": "workbench.action.editor.previousChange", 2817 | "when": "editorTextFocus && !textCompareEditorActive" 2818 | }, 2819 | { 2820 | "key": "alt+SUI_直跳 r", 2821 | "command": "workbench.action.compareEditor.previousChange", 2822 | "when": "textCompareEditorVisible" 2823 | }, 2824 | { 2825 | "key": "alt+e", 2826 | "command": "editor.action.smartSelect.expand", 2827 | "when": "editorTextFocus && editorHasSelection", 2828 | }, 2829 | { 2830 | "key": "alt+shift+e", 2831 | "command": "editor.action.smartSelect.shrink", 2832 | "when": "editorTextFocus && editorHasSelection", 2833 | }, 2834 | { 2835 | "key": "alt+SUI_直跳 f", 2836 | "command": "seito-openfile.openFileFromText", 2837 | "when": "editorTextFocus", 2838 | }, 2839 | ] 2840 | -------------------------------------------------------------------------------- /src/vscode/readme.md: -------------------------------------------------------------------------------- 1 | ## 如何查找vscode的快捷键绑定的when 2 | 在vscode的仓库 3 | 搜索 new RawContextKey 4 | 可以查到所有的暴露出来的条件 5 | 6 | ## 如何查找vscode的快捷键绑定的command 7 | 8 | - registerCommand 9 | - editorCommands.ts 10 | - coreCommand.ts // vs/editor/browser 11 | - export const enum TerminalCommandId 12 | - id: ' 13 | - 这个[网页](https://gist.github.com/skfarhat/4e88ef386c93b9dceb98121d9457edbf)搜集了一些command 14 | - 通过window的output, 设置log level 为trace, 进行动作会打印出command的id -------------------------------------------------------------------------------- /src/vscode/uninstall.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | set "TempFile=%temp%\SuiTemp.txt" 5 | 6 | fsutil reparsepoint query "%USERPROFILE%\AppData\Roaming\Code\User\keybindings.json" >"%TempFile%" 2>&1 7 | if errorlevel 1 ( 8 | echo sui did not install vscode's config, do nothing with it 9 | ) else ( 10 | del "%USERPROFILE%\AppData\Roaming\Code\User\keybindings.json" 11 | echo delete sui's vscode config ok. 12 | if exist "%USERPROFILE%\AppData\Roaming\Code\User\keybindings.json.bak" ( 13 | move "%USERPROFILE%\AppData\Roaming\Code\User\keybindings.json.bak" "%USERPROFILE%\AppData\Roaming\Code\User\keybindings.json" 14 | echo sui check there is a vscode's backup config, reinstall your backup config for you. 15 | ) 16 | ) 17 | -------------------------------------------------------------------------------- /sui.md: -------------------------------------------------------------------------------- 1 | ## spaceFn接口 2 | 3 | | 功能描述(模拟按键) | 是否必须 | norman布局(rino dest) | qwert布局(ikjl edsf) | 4 | | -------------- | -------- | -------------- | -------------- | 5 | | (up) | 是 | (space+r) | (space+i) | 6 | | (down) | 是 | (space+i) | (space+k) | 7 | | (left) | 是 | (space+n) | (space+j) | 8 | | (right) | 是 | (space+o) | (space+l) | 9 | | (pageup) | 是 | (space+d) | (space+e) | 10 | | (pagedown) | 是 | (space+e) | (space+d) | 11 | | (home) | 是 | (space+s) | (space+s) | 12 | | (end) | 是 | (space+t) | (space+f) | 13 | | (esc) | 是 | (capslock) | (capslock) | 14 | | (enter) | 最好 | (space+y) | (space+h) | 15 | | (backspace) | 最好 | (space+l) | (space+o) | 16 | | (ctrl+alt) | 最好 | (rightctrl/menu) | (rightctrl/menu) | 17 | | : command palette | 最好 | (space+p) | (space+n) | 18 | | % match | 最好 | (space+m) | (space+m) | 19 | | = gg | 否 | (space+g) | (space+h) | 20 | | _ underline | 否 | (space+u) | | 21 | | + add | 否 | (space+a) | | 22 | | (delete) | 否 | (space+.) | | 23 | | (space) | 否 | (space+b) | | 24 | | [ 大上左边 | 否 | (space+w) | | 25 | | { 大上右边 | 否 | (space+f) | | 26 | | ~ c | 否 | (space+c) | | 27 | | ` v | 否 | (space+v) | | 28 | | \ 硬记 | 否 | (space+,) | | 29 | | " | 否 | (space+') | | 30 | | (shift+1234567890-=) | 否 | (space+1234567890) | | 31 | 32 | ## 鼠标模拟接口 33 | 34 | | 功能描述 | 是否必须 | norman布局(rino dest) | qwert布局 | 35 | | -------------- | -------- | -------------- | -------------- | 36 | | 进入鼠标控制模式 | 是 | (ctrl+p) | (ctrl+n) | 37 | | 退出鼠标控制模式 | 是 | (esc or q) | (esc or q) | 38 | | 鼠标上移 | 是 | 小上 | 小上 | 39 | | 鼠标下移 | 是 | 小下 | 小下 | 40 | | 鼠标左移 | 是 | 小左 | 小左 | 41 | | 鼠标右移 | 是 | 小右 | 小右 | 42 | | 鼠标左键点击 | 是 | 大左 | 大左 | 43 | | 鼠标右键点击 | 是 | 大右 | 大右 | 44 | | 鼠标中键点击 | 是 | (大左+大右) or x | (大左+t大右) or x | 45 | | 鼠标滚轮上 | 是 | 大上 | 大上 | 46 | | 鼠标滚轮下 | 是 | 大下 | 大下 | 47 | | 鼠标慢速模式 | 是 | 按住Ctrl | 按住Ctrl | 48 | 49 | ## 备用接口(backup) 50 | 51 | | 功能描述 | 是否必须 | norman布局 | qwert布局 | 52 | | -------------- | -------- | -------------- | -------------- | 53 | | 关闭当前窗口 | 是 | (ctrl+b)q | | 54 | | 重新加载当前窗口 | 是 | (ctrl+b)r | | 55 | | 弹出命令的菜单 | 是 | (ctrl+b). | | 56 | 57 | ## 直通车接口(fallthrough) 58 | 59 | leader键 60 | 61 | | 功能描述 | 是否必须 | norman布局 | qwert布局 | 62 | | -------------- | -------- | -------------- | -------------- | 63 | | 让当前的应用程序(短暂或者长期的)不再响应停止(leader+F)以外的按键 | 是 | (leader+f) | | 64 | 65 | ## 行编辑接口(edit) 66 | 67 | | 功能描述 | 是否必须 | norman布局(rinodest) | qwert布局 | 68 | | -------------- | -------- | -------------- | -------------- | 69 | | 移动到行首 | 是 | (home) | | 70 | | 移动到行尾 | 是 | (end) | | 71 | | 在弹出的列表中上移一页 | 是 | (pageup) | | 72 | | 在弹出的列表中下移一页 | 是 | (pagedown) | | 73 | | 删除一行 | 是 | (ctrl+e)d | | 74 | | 删除光标前单词 | 是 | (ctrl+e)小左 | | 75 | | 删除光标后单词 | 是 | (ctrl+e)小右 | | 76 | | 删除光标前所有内容 | 是 | (ctrl+e)大左 | | 77 | | 删除光标后所有内容 | 是 | (ctrl+e)大右 | | 78 | | 光标左移一个单词 | 是 | (ctrl+e)大写小左 | | 79 | | 光标右移一个单词 | 是 | (ctrl+e)大写小右 | | 80 | | 拷贝整行(yank) | 是 | (ctrl+e)y | | 81 | | 粘贴内容(paste) | 是 | (ctrl+e)p | | 82 | | 撤销刚才的操作(undo) | 否(最好在shell中) | (ctrl+e)u | | 83 | | 取消撤销刚才的操作 | 否(最好在shell中) | (ctrl+e)U | | 84 | | 内容补全 | 否 | (tab) | | 85 | | 查找历史记录 | 否(最好在shell中) | (ctrl+e)e | | 86 | | 通过编辑器来编辑命令行 | 否(最好在shell中) | (ctrl+e)E | | 87 | | 其它shell快捷键功能(前面全都加一个ctrl+e作为前缀) | 否(最好在shell中) | (ctrl+e)(任意键) | | 88 | 89 | ## 打开资源接口(launch/open) 90 | 91 | | 功能描述 | 软件的类型 | 是否必须 | norman布局(rinodest) | qwert布局 | 92 | | -------------- | ---------- | -------- | -------------- | -------------- | 93 | | 打开最常见的资源 | all | 是 | (leader+l)l +(leader+l) | | 94 | | 新建垂直窗口打开资源(vertical) | all | 是 | (leader+l)v | | 95 | | 新建水平窗口打开资源(horizontal) | all | 是 | (leader+l)h | | 96 | | 新建浮动窗口打开资源(float) | all | 是 | (leader+l)f | | 97 | | 新建窗口打开资源(可以输入要打开什么资源) | all | 是 | (leader+l)w | | 98 | | 新建tab打开资源(可以输入要打开什么资源) | all | 是 | (leader+l)t | | 99 | | 刷新当前窗口(重新加载窗口) | all | 是 | (leader+l)r | | 100 | | 强制重新加载窗口(无需确认) | all | 否 | (leader+l)R | | 101 | | 重新加载配置(config) | all | 是 | (leader+l)c | | 102 | | 打开配置页面(用文本编辑器或者软件自带的设置) | all | 是 | (leader+l)C | | 103 | | 打开帮助手册页面(man) | all | 是 | (leader+l)(m or ?) | | 104 | | 打开命令菜单 | all | 是 | (leader+.) | | 105 | | 创建新的资源 | all | 否 | (leader+l)n(字母键) | | 106 | | 其它快捷操作(自己定义的一些操作) | all | 是 | (leader+l).(字母键) | | 107 | | 加载session | all | 否 | (leader+l)s | | 108 | 109 | 110 | ## 关闭资源接口(quit) 111 | 112 | | 功能描述 | 是否必须 | norman布局(rinodest) | qwert布局 | 113 | | -------------- | -------- | -------------- | -------------- | 114 | | 关闭光标所在窗口(这个最常见,所以安排一个最容易按的) | 是 | (leader+q)q or (leader+q)(leader+q) | | 115 | | 关闭光标所在窗口 | 是 | (leader+q)w | | 116 | | 关闭光标所在 tab | 是 | (leader+q)t | | 117 | | 关闭除了光标所在的窗口以外的窗口(only) | 是 | (leader+q)o | | 118 | | 关闭除了光标所在的 tab 以外的 tab (only第二个字符) | 是 | (leader+q)n | | 119 | | 关闭所有,退出程序 | 是 | (leader+q)a | | 120 | | 和对应的小写字母的功能一样, 只不过即使后台有未完成的工作也不用确认 | 是 | (leader+q)(QWTONA) | | 121 | | 可搜索的关闭窗口 | 是 | (leader+q). | | 122 | 123 | ## 切换已经打开的资源的接口 124 | 125 | 126 | | 功能描述 | 是否必须 | norman布局(rinodest) | qwert布局 | 127 | | -------------- | -------- | -------------- | -------------- | 128 | | 焦点移动到上边窗口(有些情况切换窗口无法用leader键做到,比如vscode中有时候) | 是 | (leader+小上) or (shift+上) | | 129 | | 焦点移动到下边窗口 | 是 | (leader+小下) or (shift+下) | | 130 | | 焦点移动到左边窗口 | 是 | (leader+小左) or (shift+左) | | 131 | | 焦点移动到右边窗口 | 是 | (leader+小右) or (shift+右) | | 132 | | 焦点移动到上边(浮动窗口) | 是 | (leader+上) | | 133 | | 焦点移动到下边(平铺窗口) | 是 | (leader+下) | | 134 | | 焦点移动到左边tab | 是 | (leader+左) | | 135 | | 焦点移动到右边tab | 是 | (leader+右) | | 136 | | 弹出所有tab的列表 | 是 | (leader+t). | | 137 | | 访问特定名字的tab | 是 | (leader+t)(字母键) | | 138 | | 访问特定编号的tab | 是 | (leader+t)(数字键,0代表最后的) | | 139 | | 弹出所有window的列表(当前tab或者所有tab这个看自己兴趣和不同的软件不同) | 是 | (leader+w). | | 140 | | 访问特定名字的window | 是 | (leader+w)(字母键) | | 141 | 142 | ## 拷贝粘贴资源接口 143 | 144 | | 功能描述 | 软件类型 | 是否必须 | norman布局(rinodest) | qwert布局 | 145 | | -------------- | -------- | -------- | -------------- | -------------- | 146 | | 开启拷贝资源模式 | all | 是 | (leader+y) | | 147 | | 粘贴刚刚拷贝的资源 | all | 是 | (leader+p) | | 148 | | 资源的名字 | all | 是 | (leader+y)n | | 149 | | 资源的全路径 | all | 是 | (leader+y)N | | 150 | | 资源的其它信息 | all | 是 | (leader+y)i | | 151 | | 你最常见的应用场景 | 窗口管理器 | 否 | (ctrl+y)y | | 152 | | 截图(矩形)rectangle | 窗口管理器 | 是 | (ctrl+y)r | | 153 | | 截图(窗口) | 窗口管理器 | 是 | (ctrl+y)w | | 154 | | 截图(选择窗口) | 窗口管理器 | 是 | (ctrl+y)W | | 155 | | 截图(屏幕)all | 窗口管理器 | 是 | (ctrl+y)a | | 156 | | 截图(鼠标画出任意区域) | 窗口管理器 | 是 | (ctrl+y). | | 157 | | 截图(长截图)long | 窗口管理器 | 否 | (ctrl+y)l | | 158 | | 截图(gif) | 窗口管理器 | 否 | (ctrl+y)g | | 159 | | 录制视频(video) | 窗口管理器 | 否 | (ctrl+y)v | | 160 | | 窗口所属的exe名字(name) | 窗口管理器 | 否 | (ctrl+y)n | | 161 | | 窗口所属的exe路径(Name) | 窗口管理器 | 否 | (ctrl+y)N | | 162 | | 窗口的所有信息(info) | 窗口管理器 | 否 | (ctrl+y)i | | 163 | | 文字ocr识别(text) | 窗口管理器 | 否 | (ctrl+y)pt | | 164 | | 拷贝成文件到临时目录(file) | 窗口管理器 | 否 | (ctrl+y)pf | | 165 | 166 | ## goto接口 167 | 168 | goto一般是直达特定的资源,那些资源可以没有打开,用当前的窗口把它打开并呈现出来 169 | 170 | | 功能描述 | 软件类型 | 是否必须 | norman布局(rinodest) | qwert布局 | 171 | | -------------- | -------- | -------- | -------------- | -------------- | 172 | | 焦点移动到上一个历史位置 | all | 是 | (leader+g)小左 | | 173 | | 焦点移动到下一个历史位置 | all | 是 | (leader+g)小右 | | 174 | | 搜索历史焦点位置 | all | 是 | (leader+g). | | 175 | | 焦点移动到自定义的位置 | all | 是 | (leader+g)(t 或者不按t )(字母) | | 176 | 177 | ## 窗口和tab的size接口 178 | 179 | 在文件编辑器中, 如果需要, 可以用 leader+S, 或者干脆不要这个功能 180 | 181 | | 功能描述 | 软件类型 | 是否必须 | norman布局(rinodest) | qwert布局 | 182 | | -------------- | -------- | -------- | -------------- | -------------- | 183 | | 修改窗口大小(上移变大) | all | 是 | (leader+s)小上 | | 184 | | 修改窗口大小(下移变小) | all | 是 | (leader+s)小下 | | 185 | | 修改窗口大小(左移变小) | all | 是 | (leader+s)小左 | | 186 | | 修改窗口大小(右移变大) | all | 是 | (leader+s)小右 | | 187 | | 修改窗口大小(最大化)(maxmize) | all | 是 | (leader+s)m | | 188 | | 修改窗口大小(占满)(zenmode) | all | 是 | (leader+s)z | | 189 | | 修改窗口大小(最小化)(hidden) | all | 是 | (leader+s)h | | 190 | | 修改窗口名字 | all | 否 | (leader+s)w | | 191 | | 修改tab名字 | all | 否 | (leader+s)t | | 192 | | 常用的修改大小(大) 字体,声音等 | all | 否 | (leader+s)u | | 193 | | 常用的修改大小(小) | all | 否 | (leader+s)d | | 194 | | 常用的修改大小(设置回来) | all | 否 | (leader+s)s | | 195 | 196 | ## 窗口的move接口 197 | 198 | | 功能描述 | 软件类型 | 是否必须 | norman布局(rinodest) | qwert布局 | 199 | | -------------- | -------- | -------- | -------------- | -------------- | 200 | | 修改窗口位置(上移) | all | 是 | (leader+m)小上 | | 201 | | 修改窗口位置(下移) | all | 是 | (leader+m)小下 | | 202 | | 修改窗口位置(左移) | all | 是 | (leader+m)小左 | | 203 | | 修改窗口位置(右移) | all | 是 | (leader+m)小右 | | 204 | | 修改tab位置(左移) | all | 是 | (leader+m)左 | | 205 | | 修改tab位置(右移) | all | 是 | (leader+m)右 | | 206 | | 切换窗口浮动状态 | all | 是 | (leader+m)f | | 207 | | 强制窗口浮动 | all | 是 | (leader+m)F | | 208 | 209 | ## 窗口在tab中移动的接口arrive 210 | 211 | | 功能描述 | 软件类型 | 是否必须 | norman布局(rinodest) | qwert布局 | 212 | | -------------- | -------- | -------- | -------------- | -------------- | 213 | | 窗口移动到特定tab(左边的tab) | all | 是 | (leader+a)左 | | 214 | | 窗口移动到特定tab(右边的tab) | all | 是 | (leader+a)右 | | 215 | | 窗口移动到特定tab并且焦点不变(左边的tab) | all | 是 | (leader+a)(home) | | 216 | | 窗口移动到特定tab并且焦点不变(右边的tab) | all | 是 | (leader+a)(end) | | 217 | | 窗口移动到特定tab(按tab名字) | all | 是 | (leader+a)(字母键) | | 218 | | 窗口移动到特定tab并且焦点不变(按tab名字) | all | 是 | (leader+a)(大写字母键) | | 219 | | 窗口移动到特定tab(按tab编号) | all | 是 | (leader+a)(数字键) | | 220 | | 窗口移动到tab(通过查找tab名字) | all | 是 | (leader+a). | | 221 | 222 | 223 | ## 文本编辑器接口 224 | 225 | ### 文本编辑器接口之编辑篇 226 | 227 | 编辑的接口有很多, 总体来说, 主要的目的是快速查找,或者选取到所需要的文本.然后对文本进行一些操作. 228 | dw 是 动作+对象 (省略范围是对象的默认范围) 229 | daw 是 动作+范围+对象 230 | vawy 是 选择对象 + 动作 (等价于daw) 231 | 232 | 0. sui中在选中一段文本以后光标可以进行的操作. 233 | 234 | alt+小上,alt+小下 行列的选择切换. 235 | alt+小左,alt+小右 选中状态中光标位置的切换. 236 | 在选中的状态中, 移动的命令和选择的命令一样, 移动到哪里, 就选择到哪里. 237 | 238 | 1. 需要对对象进行的操作 239 | 240 | | 描述 | 对应字母 | 241 | | -------------- | -------------- | 242 | | 跳转(to) | t | 243 | | 选择(visual) | v | 244 | | 删除(delete) | d | 245 | | 复制(yank) | y | 246 | | 注释(comment) | gc | 247 | | 对齐(align) | ga | 248 | | 其它操作(other) | z()或者co() | 249 | 250 | ga, gs, gu, gU 251 | 252 | 2. sui中常见的对象 253 | 254 | | 描述 | 对应字母 | 255 | | -------------- | -------- | 256 | | word | w | 257 | | Word | W | 258 | | line | l | 259 | | paragragh | p | 260 | | 引号 | q | 261 | | 括号 | b | 262 | | tag | t | 263 | | (整个文档)(entire) | e | 264 | | function | f | 265 | | search | s | 266 | | treesitter | m | 267 | 268 | 3. sui中对象的范围 269 | 270 | | 描述 | 对应字母 | 271 | | -------------- | -------- | 272 | | 左边 | 小左 | 273 | | 右边 | 小右 | 274 | | 两边 round | 小上/小下| 275 | | 对象所在的行 | v | 276 | | 内部 in | i | 277 | | 外部 all | a | 278 | 279 | sui中的重复操作 leader+. 280 | 281 | ### 文本编辑器接口之查找/替换篇 282 | 283 | leader+m 作为查找的起手势, 然后加上范围, 最后是(对象范围+对象) 284 | 范围可以省略(省略范围是你用的最经常的范围). 285 | leader+mr 作为替换的起手势(replace) 286 | 287 | 1. 查找的范围层级 288 | 289 | | 描述 | 对应字母 | 290 | | -------------- | -------- | 291 | | 关标选中的范围(selection) | s | 292 | | 当前的函数(function) | f | 293 | | 段落(paragragh) | p | 294 | | 当前文件(entirefile) | e | 295 | | 当前目录(dir) | d | 296 | | 当前工程(root) | r | 297 | | 整个电脑(vm) | v | 298 | 299 | 2. 查找的对象(范围) 300 | 301 | | 描述 | 对应字母 | 302 | | -------------- | -------- | 303 | | 光标所在单词 | w | 304 | | 光标所在大单词 | W | 305 | | 引号内容 | q | 306 | | 括号内容 | b | 307 | | 行内内容(不知道查什么) | l | 308 | | 符号(symbol)(func, const) | s | 309 | | 文件(file) | f | 310 | | other | o(字母) | 311 | ### 文本编辑器接口之跳转篇 312 | 313 | | 描述 | 快捷键 | 314 | | -------------- | -------- | 315 | | 你最常用的操作 | gg | 316 | | 历史记录前一个 | g小左 | 317 | | 历史记录后一个 | g小右 | 318 | | 搜索历史记录 | g. | 319 | | 跳转到定义(defination) | gd | 320 | | 跳转到引用(reference) | gr | 321 | | 跳转到实现(implementation) | gi | 322 | | 跳转到接口(interface) | gI | 323 | 324 | ### 文本编辑器接口之对code的操作 325 | 326 | | 描述 | 快捷键 | 327 | | -------------- | -------- | 328 | | 对code的建议操作(code action) | ca | 329 | | 格式化(code format) | cf | 330 | | 重命名(code rename) | cr | 331 | | 抽取方法(extract method) | ce | 332 | 333 | -------------------------------------------------------------------------------- /sui/layoutchanger/go.mod: -------------------------------------------------------------------------------- 1 | module main 2 | 3 | go 1.19 4 | 5 | require github.com/rwtodd/Go.Sed v0.0.0-20230610052213-ba3e9c186f0a 6 | -------------------------------------------------------------------------------- /sui/layoutchanger/go.sum: -------------------------------------------------------------------------------- 1 | github.com/rwtodd/Go.Sed v0.0.0-20230610052213-ba3e9c186f0a h1:URwYffGNuBQkfwkcn+1CZhb8IE/mKSXxPXp/zzQsn80= 2 | github.com/rwtodd/Go.Sed v0.0.0-20230610052213-ba3e9c186f0a/go.mod h1:c6qgHcSUeSISur4+Kcf3WYTvpL07S8eAsoP40hDiQ1I= 3 | -------------------------------------------------------------------------------- /sui/layoutchanger/layoutchanger.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soluty/sui/e38e29d37b28214bee53e7da83ce3bf33cc1d788/sui/layoutchanger/layoutchanger.exe -------------------------------------------------------------------------------- /sui/layoutchanger/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "flag" 7 | "fmt" 8 | "io" 9 | "log" 10 | "os" 11 | "path/filepath" 12 | "strings" 13 | 14 | "github.com/rwtodd/Go.Sed/sed" 15 | ) 16 | 17 | var layout string 18 | 19 | type Layout struct { 20 | Name string 21 | Keys []string 22 | } 23 | type SuiConf struct { 24 | Files []string 25 | Keys []string 26 | Layouts []*Layout 27 | } 28 | 29 | func main() { 30 | flag.StringVar(&layout, "l", "qwerty", "layout name in sui_conf.json") 31 | flag.Parse() 32 | suiRoot := os.Getenv("SUI_ROOT") 33 | if suiRoot == "" { 34 | log.Fatal("必须设置环境变量SUI_ROOT, 请运行install.bat") 35 | } 36 | confBytes, err := os.ReadFile(filepath.Join(suiRoot, "sui", "layoutchanger", "sui_conf.json")) 37 | if err != nil { 38 | log.Fatal("无法读取sui_conf.json") 39 | } 40 | var v SuiConf 41 | err = json.Unmarshal(confBytes, &v) 42 | if err != nil { 43 | log.Fatal("解析sui_conf.json错误,格式被破坏") 44 | } 45 | suiKeys := v.Keys 46 | allLayouts := map[string]*Layout{} 47 | for _, layout := range v.Layouts { 48 | if len(suiKeys) != len(layout.Keys) { 49 | log.Fatalf("layout %v 的长度不对", layout.Name) 50 | } 51 | allLayouts[layout.Name] = layout 52 | } 53 | var transKes []string 54 | if allLayouts[layout] == nil { 55 | log.Fatalf("do not support layout %v.\n", layout) 56 | } 57 | transKes = allLayouts[layout].Keys 58 | reg := `` 59 | for i, key := range suiKeys { 60 | reg += fmt.Sprintf(`s/%v/%v/g;`, key, transKes[i]) 61 | } 62 | fmt.Println("下面是", layout, "布局的sed表达式:") 63 | fmt.Println(reg) 64 | engine, err := sed.New(strings.NewReader(reg)) 65 | if err != nil { 66 | log.Fatal("sed表达式有错:", err) 67 | } 68 | for _, file := range v.Files { 69 | fmt.Println("sui开始处理文件", file) 70 | fileContent, err := os.ReadFile(filepath.Join(suiRoot, "src", file)) 71 | if err != nil { 72 | log.Fatalf("读取文件%v错误\n", file) 73 | } 74 | sedReader := engine.Wrap(bytes.NewReader(fileContent)) 75 | outfile, err := os.OpenFile(filepath.Join(suiRoot, "build", layout, file), os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm) 76 | if err != nil { 77 | log.Fatalf("openfile %v err: %v\n", file, err) 78 | } 79 | _, err = io.Copy(outfile, sedReader) 80 | if err != nil { 81 | log.Fatalf("sed处理文件%v错误: %v\n", file, err) 82 | } 83 | } 84 | fmt.Println("sui转换布局", layout, "成功.") 85 | } 86 | -------------------------------------------------------------------------------- /sui/layoutchanger/sui_conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "vscode/keybindings.json", 4 | "surfingkeys/index.js", 5 | "mouseable/config.json", 6 | "inputrc/.inputrc", 7 | "glazewm/config.yaml", 8 | "autohotkey/v1/sui.ahk", 9 | "autohotkey/v1/browser.ahk", 10 | "autohotkey/v1/common.ahk", 11 | "autohotkey/v1/editline.ahk", 12 | "autohotkey/v1/chrome/init.ahk", 13 | "autohotkey/v1/explorer/init.ahk", 14 | "autohotkey/v1/glazewm/init.ahk", 15 | "autohotkey/v1/vscode/init.ahk" 16 | ], 17 | "keys": [ 18 | "SUI_小a", 19 | "SUI_小b", 20 | "SUI_小c", 21 | "SUI_小d", 22 | "SUI_小e", 23 | "SUI_小f", 24 | "SUI_小g", 25 | "SUI_小h", 26 | "SUI_小i", 27 | "SUI_小j", 28 | "SUI_小k", 29 | "SUI_小l", 30 | "SUI_小m", 31 | "SUI_小n", 32 | "SUI_小o", 33 | "SUI_小p", 34 | "SUI_小q", 35 | "SUI_小r", 36 | "SUI_小s", 37 | "SUI_小t", 38 | "SUI_小u", 39 | "SUI_小v", 40 | "SUI_小w", 41 | "SUI_小x", 42 | "SUI_小y", 43 | "SUI_小z", 44 | "SUI_大a", 45 | "SUI_大b", 46 | "SUI_大c", 47 | "SUI_大d", 48 | "SUI_大e", 49 | "SUI_大f", 50 | "SUI_大g", 51 | "SUI_大h", 52 | "SUI_大i", 53 | "SUI_大j", 54 | "SUI_大k", 55 | "SUI_大l", 56 | "SUI_大m", 57 | "SUI_大n", 58 | "SUI_大o", 59 | "SUI_大p", 60 | "SUI_大q", 61 | "SUI_大r", 62 | "SUI_大s", 63 | "SUI_大t", 64 | "SUI_大u", 65 | "SUI_大v", 66 | "SUI_大w", 67 | "SUI_大x", 68 | "SUI_大y", 69 | "SUI_大z", 70 | "SUI_逗号", 71 | "SUI_句号", 72 | "SUI_鼠标", 73 | "SUI_行编辑", 74 | "SUI_拷贝", 75 | "SUI_粘贴", 76 | "SUI_大小", 77 | "SUI_移动", 78 | "SUI_跳转", 79 | "SUI_直跳", 80 | "SUI_备份", 81 | "SUI_打开", 82 | "SUI_关闭", 83 | "SUI_直通", 84 | "SUI_窗口", 85 | "SUI_标签", 86 | "SUI_撤销", 87 | "SUI_删除", 88 | "SUI_选择模式", 89 | "SUI_对象内部", 90 | "SUI_对象外部", 91 | "SUI_对象两边", 92 | "SUI_小上", 93 | "SUI_小下", 94 | "SUI_小左", 95 | "SUI_小右", 96 | "SUI_大上", 97 | "SUI_大下", 98 | "SUI_大左", 99 | "SUI_大右", 100 | "SUI_去到标签", 101 | "SUI_S鼠标", 102 | "SUI_S行编辑", 103 | "SUI_S拷贝", 104 | "SUI_S粘贴", 105 | "SUI_S大小", 106 | "SUI_S移动", 107 | "SUI_S跳转", 108 | "SUI_S直跳", 109 | "SUI_S备份", 110 | "SUI_S打开", 111 | "SUI_S关闭", 112 | "SUI_S直通", 113 | "SUI_S窗口", 114 | "SUI_S标签", 115 | "SUI_S撤销", 116 | "SUI_S删除", 117 | "SUI_S选择模式", 118 | "SUI_S对象内部", 119 | "SUI_S对象外部", 120 | "SUI_S对象两边", 121 | "SUI_S小上", 122 | "SUI_S小下", 123 | "SUI_S小左", 124 | "SUI_S小右", 125 | "SUI_S大上", 126 | "SUI_S大下", 127 | "SUI_S大左", 128 | "SUI_S大右", 129 | "SUI_S去到标签" 130 | ], 131 | "layouts": [ 132 | { 133 | "name": "norman", 134 | "keys": [ 135 | "a", 136 | "b", 137 | "c", 138 | "e", 139 | "d", 140 | "t", 141 | "g", 142 | "y", 143 | "r", 144 | "n", 145 | "i", 146 | "o", 147 | "m", 148 | "p", 149 | "l", 150 | ";", 151 | "q", 152 | "f", 153 | "s", 154 | "k", 155 | "u", 156 | "v", 157 | "w", 158 | "x", 159 | "j", 160 | "z", 161 | "A", 162 | "B", 163 | "C", 164 | "E", 165 | "D", 166 | "T", 167 | "G", 168 | "Y", 169 | "R", 170 | "N", 171 | "I", 172 | "O", 173 | "M", 174 | "P", 175 | "L", 176 | ":", 177 | "Q", 178 | "F", 179 | "S", 180 | "K", 181 | "U", 182 | "V", 183 | "W", 184 | "X", 185 | "J", 186 | "Z", 187 | ",", 188 | ".", 189 | "p", 190 | "e", 191 | "y", 192 | "p", 193 | "s", 194 | "m", 195 | "t", 196 | "g", 197 | "b", 198 | "l", 199 | "q", 200 | "f", 201 | "w", 202 | "t", 203 | "u", 204 | "d", 205 | "v", 206 | "i", 207 | "a", 208 | "r", 209 | "r", 210 | "i", 211 | "n", 212 | "o", 213 | "d", 214 | "e", 215 | "s", 216 | "t", 217 | "a", 218 | "P", 219 | "E", 220 | "Y", 221 | "P", 222 | "S", 223 | "M", 224 | "T", 225 | "G", 226 | "B", 227 | "L", 228 | "Q", 229 | "F", 230 | "W", 231 | "T", 232 | "U", 233 | "D", 234 | "V", 235 | "I", 236 | "A", 237 | "R", 238 | "R", 239 | "I", 240 | "N", 241 | "O", 242 | "D", 243 | "E", 244 | "S", 245 | "T", 246 | "A" 247 | ] 248 | }, 249 | { 250 | "name": "qwerty", 251 | "keys": [ 252 | "a", 253 | "b", 254 | "c", 255 | "d", 256 | "e", 257 | "f", 258 | "g", 259 | "h", 260 | "i", 261 | "j", 262 | "k", 263 | "l", 264 | "m", 265 | "n", 266 | "o", 267 | "p", 268 | "q", 269 | "r", 270 | "s", 271 | "t", 272 | "u", 273 | "v", 274 | "w", 275 | "x", 276 | "y", 277 | "z", 278 | "A", 279 | "B", 280 | "C", 281 | "D", 282 | "E", 283 | "F", 284 | "G", 285 | "H", 286 | "I", 287 | "J", 288 | "K", 289 | "L", 290 | "M", 291 | "N", 292 | "O", 293 | "P", 294 | "Q", 295 | "R", 296 | "S", 297 | "T", 298 | "U", 299 | "V", 300 | "W", 301 | "X", 302 | "Y", 303 | "Z", 304 | ",", 305 | ".", 306 | 307 | "n", 308 | "e", 309 | "y", 310 | "p", 311 | "s", 312 | "m", 313 | "t", 314 | "g", 315 | "b", 316 | "o", 317 | "q", 318 | "f", 319 | "w", 320 | "t", 321 | "u", 322 | "d", 323 | "v", 324 | "i", 325 | "a", 326 | "k", 327 | "i", 328 | "k", 329 | "j", 330 | "l", 331 | "e", 332 | "d", 333 | "s", 334 | "f", 335 | "a", 336 | "N", 337 | "E", 338 | "Y", 339 | "P", 340 | "S", 341 | "M", 342 | "T", 343 | "G", 344 | "B", 345 | "O", 346 | "Q", 347 | "F", 348 | "W", 349 | "T", 350 | "U", 351 | "D", 352 | "V", 353 | "I", 354 | "A", 355 | "K", 356 | "I", 357 | "K", 358 | "J", 359 | "L", 360 | "E", 361 | "D", 362 | "S", 363 | "F", 364 | "A" 365 | ] 366 | } 367 | ] 368 | } -------------------------------------------------------------------------------- /sui/not_implement.bat: -------------------------------------------------------------------------------- 1 | python "%SUI_ROOT%/sui/not_implement.py" 2 | -------------------------------------------------------------------------------- /sui/not_implement.py: -------------------------------------------------------------------------------- 1 | from tkinter import messagebox 2 | 3 | messagebox.showinfo("Warn", "Not implemented!") 4 | 5 | -------------------------------------------------------------------------------- /sui编辑器接口速查表.md: -------------------------------------------------------------------------------- 1 | # visual转换 2 | ,v visual-block 3 | v visual 4 | 在v里面按v visual-line 5 | 在v里按,v visual-block 6 | 7 | # 一般的操作 8 | 9 | 1. 动作 10 | - d delete 11 | - c change 12 | - y yank 13 | - v visual 14 | - t to 15 | - gc comment 16 | - ga align 17 | - j/J|h/H join/unjoin 18 | - gx wait for swap 19 | - zc/zo 折叠对象 20 | - ,开头 自定义动作 21 | - zt trim行尾的空格 22 | 23 | 2. 范围 24 | - i inside 25 | - a around 26 | - v visual line 27 | - n|j small_left 28 | - o|l small_right 29 | - r|k small_center 30 | 31 | vni voa ri ra (vni)都可以省略 32 | 33 | 3. 对象 34 | - w word 35 | - W WORD 36 | - q quote 37 | - b bracket 38 | - l|o line 39 | - t tag 40 | - p paragraph 41 | - f function 42 | - e entire 43 | - s search 44 | - m match(treesitter) 45 | - . 空对象,一般是查询或者等待用户输入 46 | 47 | 一些例子: 48 | 49 | gap gcb gml gmf 50 | 51 | 无对象的动作 对象一般是当前的光标或者当前的文件 52 | 53 | 例如: gw, gf, gd, gr, gi, (,cr) 54 | 55 | # 搜索和替换操作 56 | 57 | 理论上搜索和替换也可以加入, 操作范围对象的模式, 但是, 搜索的范围和其它操作的范围不太一样, 58 | 其它的操作, paragraph和function还有entire都是作为对象来看的, 而搜索和替换这3个是作为搜索的范围 59 | 来看的, 并且搜索的对象和其它操作的对象也不一样. 搜索存在file文件对象, 不存在tag对象, 因为tag通常不在一行内, 60 | 而quote和bracket有时候会在一行以内. 61 | 62 | 动作只有两个 63 | m 搜索 64 | M 替换 65 | 66 | 在选中状态下,m加层次, 直接会在该层搜索选中的对象 67 | 68 | 1. 搜索的范围 69 | 70 | - s selection 71 | - p paragraph 72 | - f function 73 | - e entire 74 | - d dir 75 | - r root 76 | - v virtual machine 77 | - A any 自定义层次 78 | 79 | 2. 可以被搜索的对象(可以不带) 80 | 81 | - w word 82 | - W WORD 83 | - q quote 84 | - b bracket 85 | - l line 86 | - f file 87 | - c 剪切板对象(copy&paste) 88 | - s symbol (s. sc sv ss si sp)等 89 | - . 空对象,需要自己输入值的 90 | - ,开头 自定义对象 91 | 92 | # 选中一块区域的特殊操作 93 | 94 | - ,i copy line down 95 | - ,I move line down 96 | - ,r copy line up 97 | - ,R move line up 98 | 99 | 100 | -------------------------------------------------------------------------------- /uninstall.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set xdir=%~dp0 4 | 5 | set "defaultlayout=qwerty" 6 | set "layout=%~1" 7 | 8 | if "%layout%"=="" ( 9 | set "layout=%defaultlayout%" 10 | ) 11 | if "%layout%"=="norman" ( 12 | goto :continue 13 | ) 14 | if "%layout%"=="qwerty" ( 15 | goto :continue 16 | ) 17 | 18 | echo currently sui do not support layout: %layout% 19 | exit \b 20 | 21 | :continue 22 | 23 | echo your keyboard layout is: %layout% 24 | 25 | if not exist "%xdir%build\%layout%" ( 26 | echo sui not existed in your computer. 27 | pause 28 | exit 29 | ) 30 | 31 | echo start to uninstall sui... 32 | 33 | REM exec sub dirs install.bat 34 | for /f %%i in ('dir /b /ad "%xdir%build\%layout%"') do ( 35 | if exist "%xdir%build\%layout%\%%i\uninstall.bat" ( 36 | echo uninstall %%i's config... 37 | call "%xdir%build\%layout%\%%i\uninstall.bat" "%layout%" 38 | if %errorlevel%==0 ( 39 | echo uninstall %%i ok 40 | ) 41 | ) 42 | ) 43 | pause 44 | -------------------------------------------------------------------------------- /why not emacs and vim.md: -------------------------------------------------------------------------------- 1 | # emacs的主要快捷键 2 |   C-f 前进一个字符 3 |   C-b 后退一个字符 4 |   C-p 上一行 5 |   C-n 下一行 6 |   M-f 前进一个单词 7 |   M-b 后退一个单词 8 |   C-a 行首 9 |   C-e 行尾 10 |   C-v 下翻一页 11 |   M-v 上翻一页 12 |   M-< 文件头 13 |   M-> 文件尾 14 | 15 | 可以看到, emacs主要的光标操作,用到了大量的ctrl或者alt键, 是通过联想单词来实现的. 16 | 语义的联想(让其它键盘布局的人很难适应) 17 | 快捷键容易冲突. 18 | 19 | # vim的快捷键 20 | 21 | 模式 22 | 怎么生成一个随机字符串 把vim打开,让新手退出vim 23 | 只定义了文本编辑领域, 对窗口的管理未涉及, 而且有些快捷键逻辑不一致. 24 | 例如undo, redo u是undo, U是undo-all, ctrl-r是redo, 为啥redo不是r呢? 25 | 是goto last, 是go回来 26 | hjkl只能用于标准布局,要用于其它布局, 则很麻烦, 如果映射成其它布局的类似键, 则其它接口需要对应调整会丧失语义 27 | 28 | # sui的快捷键 29 | - spaceFn解决上下左右, Home,End,PageUp,PageDown的问题 30 | - 定义了一套增删改查接口,不管是模式编辑器还是非模式编辑器都可以使用,甚至其它软件也可以使用 31 | - 补充了vim的对象范围, 增加对象左边, 对象右边, 对象两边的范围. 32 | - 优化了vim中逻辑不太好的部分 33 | - 分层解决了快捷键冲突的问题 34 | --------------------------------------------------------------------------------