blob: 9f6262c25ce0e9c81d7ff6216e13cbac25f82b0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
(setq avy-background t
avy-all-windows t
avy-timeout-seconds 0.3)
(when (gx/maybe-require-package 'avy)
(define-key global-map (kbd "C-:") #'avy-goto-char-timer)
(define-key global-map (kbd "C-'") #'avy-goto-char-2)
(define-key global-map (kbd "C-c C-j") #'avy-resume)
(with-eval-after-load 'evil
(require 'avy)
(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-above)))
(provide 'init-avy)
|