aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/init-misc.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp/init-misc.el')
-rw-r--r--.emacs.d/lisp/init-misc.el18
1 files changed, 17 insertions, 1 deletions
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 "<SPC>j") 'evil-avy-goto-line-below
+ (kbd "<SPC>k") 'evil-avy-goto-line-above
+ (kbd "<SPC>w") 'evil-avy-goto-word-0
+ (kbd "<SPC>f") 'evil-avy-goto-char)
+ (evil-define-key 'visual 'global
+ (kbd "<SPC>j") 'evil-avy-goto-line-below
+ (kbd "<SPC>k") 'evil-avy-goto-line-above)
+ (evil-define-key 'operator 'global
+ (kbd "<SPC>j") 'evil-avy-goto-line-below
+ (kbd "<SPC>k") 'evil-avy-goto-line-below)))
+
(gx/maybe-require-package 'rg)
(gx/maybe-require-package 'esup)