-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgs-keys-evil.el
197 lines (171 loc) · 5.01 KB
/
gs-keys-evil.el
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
;;; -*- lexical-binding: t -*-
(use-package simple
:bind
("C-M-u" . universal-argument)
)
(use-package emacs
:custom
(evil-want-keybinding nil)
)
(use-package evil
:ensure t
)
(use-package evil-core
:config
;; Use visual line motions even outside of visual-line-mode buffers
(evil-global-set-key 'motion "j" 'evil-next-visual-line)
(evil-global-set-key 'motion "k" 'evil-previous-visual-line)
:init
(evil-mode)
)
(use-package evil-vars
:custom
(evil-disable-insert-state-bindings t) ;; 2
(evil-respect-visual-line-mode t) ;; 1
(evil-undo-system 'undo-redo)
(evil-split-window-below t) ;; 1
(evil-v$-excludes-newline t) ;; 1
(evil-vsplit-window-right t) ;; 1
(evil-want-C-i-jump nil) ;; 1
(evil-want-C-u-scroll t)
(evil-want-Y-yank-to-eol t) ;; 2
)
(use-package evil-commands
:bind
(
:map evil-normal-state-map
("C-n" . evil-next-line)
("C-p" . evil-previous-line)
(")" . evil-next-close-paren)
("(" . evil-previous-open-paren)
)
)
(use-package evil-search
:custom
(evil-search-module 'evil-search)
)
(use-package evil-states
:bind
(
:map evil-insert-state-map
;; In insert state, use the default quit command to return to normal state
("C-g" . evil-normal-state)
:map evil-motion-state-map
;; Disabled to avoid conflict with Org Mode
("RET" . nil)
)
)
(use-package evil-core
:after org-appear
:custom
(org-appear-trigger 'manual)
:config
(add-hook 'org-mode-hook (lambda ()
(add-hook 'evil-insert-state-entry-hook
#'org-appear-manual-start
nil
t)
(add-hook 'evil-insert-state-exit-hook
#'org-appear-manual-stop
nil
t)))
)
(use-package evil-core
:after vertico
:bind
(
:map vertico-map
("C-j" . vertico-next)
("C-k" . vertico-previous)
)
)
(use-package evil-core
:config
(evil-set-leader nil (kbd "SPC"))
)
(use-package evil-core
:config
(evil-define-key 'normal 'global (kbd "<leader>B") #'ibuffer)
(evil-define-key 'normal 'global (kbd "<leader>b") #'switch-to-buffer)
)
(use-package evil-core
:config
(evil-define-key 'normal 'global (kbd "<leader>ie") #'emoji-insert)
(evil-define-key 'normal 'global (kbd "<leader>ic") #'insert-char)
)
(use-package evil-core
:config
(evil-define-key 'normal 'global (kbd "<leader>fe") #'(lambda () (interactive) (find-file (expand-file-name "emacs.org" user-emacs-directory))))
)
(use-package evil-core
:config
(evil-define-key 'normal 'global (kbd "<leader>oa") #'org-agenda)
(evil-define-key 'normal 'global (kbd "<leader>oc") #'org-clock-report)
(evil-define-key 'normal 'global (kbd "<leader>od") #'org-deadline)
(evil-define-key 'normal 'global (kbd "<leader>ol") #'org-insert-link)
(evil-define-key 'normal 'global (kbd "<leader>os") #'org-schedule)
(evil-define-key 'normal 'global (kbd "<leader>op") #'org-set-property)
(evil-define-key 'normal 'global (kbd "<leader>ot") #'org-todo)
)
(use-package evil-core
:config
(evil-define-key 'normal 'global (kbd "<leader>wo") #'other-window)
(evil-define-key 'normal 'global (kbd "<leader>wk") #'windmove-up)
(evil-define-key 'normal 'global (kbd "<leader>wj") #'windmove-down)
(evil-define-key 'normal 'global (kbd "<leader>wh") #'windmove-left)
(evil-define-key 'normal 'global (kbd "<leader>wl") #'windmove-right)
)
(use-package evil-core
:config
(evil-define-key 'normal 'global (kbd "<leader>ts") #'eshell)
)
(use-package evil-core
:after magit
:config
(evil-define-key 'normal 'global (kbd "<leader>mc") #'magit-clone)
(evil-define-key 'normal 'global (kbd "<leader>ms") #'magit-status)
)
(use-package evil-core
:after org-roam
:config
(evil-define-key 'normal 'global (kbd "<leader>rb") #'dw/org-roam-capture-inbox)
(evil-define-key 'normal 'global (kbd "<leader>rd") #'org-roam-dailies-map)
(evil-define-key 'normal 'global (kbd "<leader>rf") #'org-roam-node-find)
(evil-define-key 'normal 'global (kbd "<leader>ri") #'org-roam-node-insert)
)
(use-package evil-core
:after org-roam-ui
:config
(evil-define-key 'normal 'global (kbd "<leader>ru") #'org-roam-ui-open)
)
(use-package evil-core
:after nerd-icons
:config
(evil-define-key 'normal 'global (kbd "<leader>in") #'nerd-icons-insert)
)
(use-package evil-collection
:vc (:url "https://github.com/emacs-evil/evil-collection")
:ensure t
:init
(evil-collection-init)
)
(use-package evil-org
:vc (:url "https://github.com/Somelauw/evil-org-mode")
:hook
(
(org-agenda-mode . evil-org-mode)
(org-mode . evil-org-mode)
)
:config
(evil-org-set-key-theme '(navigation todo insert textobjects additional))
:ensure t
)
(use-package evil-org-agenda
:config
(evil-org-agenda-set-keys)
)
(use-package which-key
:custom
(which-key-allow-evil-operators t)
)
(provide 'gs-keys-evil)