Skip to content

Commit

Permalink
feat: add new bindings for period, ZZ, and ZQ in Vim mode
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmdnk committed Sep 28, 2024
1 parent 9fca214 commit 85fcf86
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/bind/vim_normal.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,28 @@ u::SendInput("^z")
A_Clipboard := ClipSaved
}

; period
.::SendInput("+^{Right}{BS}^v")

; Z mode
+z::Vim.State.SetMode("Z")
#HotIf Vim.IsVimGroup() and (Vim.State.IsCurrentVimMode("Z"))

; ZZ
+z::
{
SendInput("^s")
SendInput("!{F4}")
Vim.State.SetMode("Vim_Normal")
}

; ZQ
+q::
{
SendInput("!{F4}")
Vim.State.SetMode("Vim_Normal")
}

; period
.::SendInput("+^{Right}{BS}^v")

; Q-dir
#HotIf Vim.IsVimGroup() and WinActive("ahk_group VimQdir") and (Vim.State.Mode == "Vim_Normal")
; For Q-dir, ^X mapping does not work, use !X instead.
Expand Down

0 comments on commit 85fcf86

Please sign in to comment.