diff options
author | Guangxiong Lin <[email protected]> | 2022-05-11 20:15:50 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-05-11 20:15:50 +0800 |
commit | 5333a4431208fd242a33907f34d41f6373934088 (patch) | |
tree | c62569654621e42cb04c5adabb6d0aa02451a14d /.emacs.d/lisp | |
parent | dd2a2fbc97e2f51e59e74c8850cfb8eede76b572 (diff) | |
download | dotfiles-5333a4431208fd242a33907f34d41f6373934088.tar.gz dotfiles-5333a4431208fd242a33907f34d41f6373934088.tar.bz2 dotfiles-5333a4431208fd242a33907f34d41f6373934088.zip |
Update easymotion config in emacs
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r-- | .emacs.d/lisp/init-evil.el | 13 | ||||
-rw-r--r-- | .emacs.d/lisp/init-misc.el | 18 |
2 files changed, 19 insertions, 12 deletions
diff --git a/.emacs.d/lisp/init-evil.el b/.emacs.d/lisp/init-evil.el index 983cf77..535d48d 100644 --- a/.emacs.d/lisp/init-evil.el +++ b/.emacs.d/lisp/init-evil.el @@ -22,17 +22,8 @@ (kbd "gd") 'xref-find-definitions (kbd "gr") 'xref-find-references - (kbd "C-t") 'xref-pop-marker-stack - - (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) - + (kbd "C-t") 'xref-pop-marker-stack) + (evil-define-key 'normal text-mode-map (kbd "j") 'evil-next-visual-line (kbd "k") 'evil-previous-visual-line 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) |