From 7a88b6208dd50374d956128004b8d45c01539337 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Tue, 10 May 2022 23:09:43 +0800 Subject: Use evil-avy instead of evil-easymotion (emacs) --- .emacs.d/lisp/init-evil.el | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to '.emacs.d/lisp') diff --git a/.emacs.d/lisp/init-evil.el b/.emacs.d/lisp/init-evil.el index ed3f58f..983cf77 100644 --- a/.emacs.d/lisp/init-evil.el +++ b/.emacs.d/lisp/init-evil.el @@ -15,13 +15,24 @@ (evil-define-key 'insert 'global (kbd "C-r") 'evil-paste-from-register (kbd "C-【") 'evil-normal-state) + (evil-define-key 'normal 'global (kbd "gj") 'evil-next-visual-line (kbd "gk") 'evil-previous-visual-line (kbd "gd") 'xref-find-definitions (kbd "gr") 'xref-find-references - (kbd "C-t") 'xref-pop-marker-stack) + (kbd "C-t") 'xref-pop-marker-stack + + (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 'normal text-mode-map (kbd "j") 'evil-next-visual-line (kbd "k") 'evil-previous-visual-line @@ -48,10 +59,4 @@ (with-eval-after-load 'evil-collection-unimpaired (gx/diminish 'evil-collection-unimpaired-mode)) -;; evil-easymotion -(when (gx/maybe-require-package 'evil-easymotion) - (with-eval-after-load 'evil - (require 'evil-easymotion) - (evilem-default-keybindings "SPC"))) - (provide 'init-evil) -- cgit v1.2.3