blob: 0539784740ef3daa8f6613644eda01ade9df1ec5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
(when (gx/maybe-require-package 'evil)
(add-hook 'after-init-hook (lambda () (evil-mode 1))))
(setq evil-want-integration t
evil-want-C-u-scroll t
evil-wannt-fine-undo t
evil-want-keybinding nil
evil-disable-insert-state-bindings t
evil-toggle-key "C-x C-z")
(with-eval-after-load 'evil
(evil-set-leader 'normal ",")
(evil-set-undo-system 'undo-tree)
(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)
(evil-define-key 'normal text-mode-map
(kbd "j") 'evil-next-visual-line
(kbd "k") 'evil-previous-visual-line
(kbd "gj") 'evil-next-line
(kbd "gk") 'evil-previous-line)
(gx/diminish 'evil-mode))
;; evil-collection
(when (gx/maybe-require-package 'evil-collection)
(with-eval-after-load 'evil
(evil-collection-init
'(xref
dired
ibuffer
image
magit))))
(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
(evilem-default-keybindings "SPC")))
(provide 'init-evil)
|