diff options
| author | Tom Dalziel <tom_dl@hotmail.com> | 2024-05-22 22:46:36 +0200 |
|---|---|---|
| committer | Tom Dalziel <33435574+tomdl89@users.noreply.github.com> | 2024-05-26 17:24:32 +0200 |
| commit | 89efb079a1b31c1881adcc6b370b20ce85f2b5bc (patch) | |
| tree | 400599f150e4deb03e7145371ed390139b5e319d /evil-types.el | |
| parent | e8c8e028261f9d57f8c570952043fcd165df41cb (diff) | |
Allow count after C-w for window commands
Fixes #1902
Diffstat (limited to 'evil-types.el')
| -rw-r--r-- | evil-types.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/evil-types.el b/evil-types.el index 67ea9ce..360316a 100644 --- a/evil-types.el +++ b/evil-types.el @@ -277,6 +277,13 @@ the last column is excluded." ;;; Custom interactive codes +(evil-define-interactive-code "<w>" + "Prefix argument converted to number, possibly multiplied by evil--window-digit." + (let ((prefix-num (prefix-numeric-value current-prefix-arg))) + (if evil--window-digit + (list (* evil--window-digit prefix-num)) + (list prefix-num)))) + (evil-define-interactive-code "<c>" "Count." (list (when current-prefix-arg @@ -294,6 +301,14 @@ directly." (prefix-numeric-value current-prefix-arg)))) +(evil-define-interactive-code "<wc>" + "Prefix argument converted to number, or nil possibly multiplied by +evil--window-digit." + (let ((prefix-num (prefix-numeric-value current-prefix-arg))) + (list + (cond (evil--window-digit (* evil--window-digit prefix-num)) + (current-prefix-arg prefix-num))))) + (evil-define-interactive-code "<C>" "Character read through `evil-read-key'." (list |
