blob: 55a42c834e40115d3688241411c6e64e5cee18e3 (
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
|
(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)
(with-eval-after-load 'evil
(evil-set-leader 'normal ",")
(evil-set-undo-system 'undo-tree)
(evil-define-key 'insert 'global
(kbd "C-【") 'evil-normal-state)
(evil-define-key 'normal 'global
(kbd "gj") 'evil-next-visual-line
(kbd "gk") 'evil-previous-visual-line)
(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)))
(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)
|