diff options
author | Guangxiong Lin <[email protected]> | 2022-05-10 23:09:43 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-05-10 23:09:43 +0800 |
commit | 7a88b6208dd50374d956128004b8d45c01539337 (patch) | |
tree | 9fc42524f121273072fa59a013d23fb4249603f1 /.emacs.d/lisp/init-evil.el | |
parent | 13a433585c22172be7f849333fe7b873965d401c (diff) | |
download | dotfiles-7a88b6208dd50374d956128004b8d45c01539337.tar.gz dotfiles-7a88b6208dd50374d956128004b8d45c01539337.tar.bz2 dotfiles-7a88b6208dd50374d956128004b8d45c01539337.zip |
Use evil-avy instead of evil-easymotion (emacs)
Diffstat (limited to '.emacs.d/lisp/init-evil.el')
-rw-r--r-- | .emacs.d/lisp/init-evil.el | 19 |
1 files changed, 12 insertions, 7 deletions
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 "<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 '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) |