Last active
February 2, 2026 01:42
-
-
Save andreyka26-git/6ea6aac06fee02825637f524131a9fee to your computer and use it in GitHub Desktop.
VimMode for Windows via AutoHotkey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires AutoHotkey v2.0 | |
| SetCapsLockState "AlwaysOff" | |
| ; --- CAPS LOCK MODIFIER LOGIC --- | |
| *CapsLock::return | |
| *CapsLock up:: { | |
| if (A_PriorKey = "CapsLock") { | |
| Send "{Esc}" | |
| } | |
| } | |
| ; --- VIM MOTIONS (With Selection Support) --- | |
| ; The "*" allows Shift, Ctrl, etc. to be held while pressing these keys | |
| #HotIf GetKeyState("CapsLock", "P") | |
| *h::Send "{Blind}{Left}" | |
| *j::Send "{Blind}{Down}" | |
| *k::Send "{Blind}{Up}" | |
| *l::Send "{Blind}{Right}" | |
| *u::Send "{Blind}{PgUp}" | |
| *d::Send "{Blind}{PgDn}" | |
| *w::Send "{Blind}^{Right}" | |
| *b::Send "{Blind}^{Left}" | |
| *4::Send "{Blind}{End}" | |
| *-::Send "{Blind}{Home}" | |
| #HotIf | |
| ; --- RIGHT ALT MOTIONS --- | |
| >!h::Send "{Blind}{Left}" | |
| >!j::Send "{Blind}{Down}" | |
| >!k::Send "{Blind}{Up}" | |
| >!l::Send "{Blind}{Right}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment