From 5333a4431208fd242a33907f34d41f6373934088 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Wed, 11 May 2022 20:15:50 +0800 Subject: Update easymotion config in emacs --- .emacs.d/lisp/init-misc.el | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to '.emacs.d/lisp/init-misc.el') diff --git a/.emacs.d/lisp/init-misc.el b/.emacs.d/lisp/init-misc.el index 4275c5c..a34b0b5 100644 --- a/.emacs.d/lisp/init-misc.el +++ b/.emacs.d/lisp/init-misc.el @@ -54,7 +54,23 @@ (with-eval-after-load 'hideshow (gx/diminish 'hs-minor-mode)) -(gx/maybe-require-package 'avy) +(setq avy-background t + avy-all-windows t + avy-timeout-seconds 0.3) +(when (gx/maybe-require-package 'avy) + (with-eval-after-load 'evil + (evil-define-key 'normal 'global + (kbd "j") 'evil-avy-goto-line-below + (kbd "k") 'evil-avy-goto-line-above + (kbd "w") 'evil-avy-goto-word-0 + (kbd "f") 'evil-avy-goto-char) + (evil-define-key 'visual 'global + (kbd "j") 'evil-avy-goto-line-below + (kbd "k") 'evil-avy-goto-line-above) + (evil-define-key 'operator 'global + (kbd "j") 'evil-avy-goto-line-below + (kbd "k") 'evil-avy-goto-line-below))) + (gx/maybe-require-package 'rg) (gx/maybe-require-package 'esup) -- cgit v1.2.3