No-op set-repeater! later if +evil-repeat-keys is nil
This commit is contained in:
parent
df36e7f4d3
commit
9113eab65a
1 changed files with 30 additions and 30 deletions
|
@ -346,16 +346,16 @@ directives. By default, this only recognizes C directives.")
|
||||||
;;
|
;;
|
||||||
;;; Keybinds
|
;;; Keybinds
|
||||||
|
|
||||||
(when +evil-repeat-keys
|
|
||||||
(defmacro set-repeater! (command next-func prev-func)
|
(defmacro set-repeater! (command next-func prev-func)
|
||||||
"Makes ; and , the universal repeat-keys in evil-mode.
|
"Makes ; and , the universal repeat-keys in evil-mode.
|
||||||
To change these keys see `+evil-repeat-keys'."
|
To change these keys see `+evil-repeat-keys'."
|
||||||
(let ((fn-sym (intern (format "+evil/repeat-%s" (doom-unquote command)))))
|
(let ((fn-sym (intern (format "+evil/repeat-%s" (doom-unquote command)))))
|
||||||
`(progn
|
`(progn
|
||||||
(defun ,fn-sym (&rest _)
|
(defun ,fn-sym (&rest _)
|
||||||
|
(when +evil-repeat-keys
|
||||||
(evil-define-key* 'motion 'local
|
(evil-define-key* 'motion 'local
|
||||||
(kbd (car +evil-repeat-keys)) #',next-func
|
(kbd (car +evil-repeat-keys)) #',next-func
|
||||||
(kbd (cdr +evil-repeat-keys)) #',prev-func))
|
(kbd (cdr +evil-repeat-keys)) #',prev-func)))
|
||||||
(advice-add #',command :after-while #',fn-sym))))
|
(advice-add #',command :after-while #',fn-sym))))
|
||||||
|
|
||||||
;; n/N
|
;; n/N
|
||||||
|
@ -381,7 +381,7 @@ To change these keys see `+evil-repeat-keys'."
|
||||||
(set-repeater! evil-visualstar/begin-search-forward
|
(set-repeater! evil-visualstar/begin-search-forward
|
||||||
evil-ex-search-next evil-ex-search-previous)
|
evil-ex-search-next evil-ex-search-previous)
|
||||||
(set-repeater! evil-visualstar/begin-search-backward
|
(set-repeater! evil-visualstar/begin-search-backward
|
||||||
evil-ex-search-previous evil-ex-search-next))
|
evil-ex-search-previous evil-ex-search-next)
|
||||||
|
|
||||||
|
|
||||||
;; `evil-collection'
|
;; `evil-collection'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue