aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/init-misc.el
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-05-11 20:15:50 +0800
committerGuangxiong Lin <[email protected]>2022-05-11 20:15:50 +0800
commit5333a4431208fd242a33907f34d41f6373934088 (patch)
treec62569654621e42cb04c5adabb6d0aa02451a14d /.emacs.d/lisp/init-misc.el
parentdd2a2fbc97e2f51e59e74c8850cfb8eede76b572 (diff)
downloaddotfiles-5333a4431208fd242a33907f34d41f6373934088.tar.gz
dotfiles-5333a4431208fd242a33907f34d41f6373934088.tar.bz2
dotfiles-5333a4431208fd242a33907f34d41f6373934088.zip
Update easymotion config in emacs
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)