From 1983363f9c815622c69f75696e3f195810d0a331 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 25 Mar 2018 22:39:03 -0400 Subject: [PATCH] config/default: add +default-repeat-{forward,backward}-key options --- modules/config/default/config.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index d5c563849..102c3f367 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -74,14 +74,17 @@ (load! +evil-commands)) (when (featurep! +bindings) + (defvar +default-repeat-forward-key ";") + (defvar +default-repeat-backward-key ",") + ;; Makes ; and , the universal repeat-keys in evil-mode (defmacro do-repeat! (command next-func prev-func) "Repeat motions with ;/," (let ((fn-sym (intern (format "+evil*repeat-%s" command)))) `(progn (defun ,fn-sym (&rest _) - (define-key evil-motion-state-map ";" ',next-func) - (define-key evil-motion-state-map "," ',prev-func)) + (define-key evil-motion-state-map +default-repeat-forward-key ',next-func) + (define-key evil-motion-state-map +default-repeat-backward-key ',prev-func)) (advice-add #',command :before #',fn-sym)))) ;; n/N