Commit 3b7ac0bb83

3b7ac0bb834d9998a0fe66ffd380f085a32c885d

parent: 89259afa1d

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-11 04:08 UTC

Split Presets.swift

Layout: unified · split

Sources/OrgCore/Keymap/PresetDoom.swift added +497
@@ -0,0 +1,497 @@
1extension KeymapPreset {
2 static var doomToml: String {
3 var problems: [String] = []
4 let emacs = try! Keymap(toml: common + emacsBindings, problems: &problems)
5 let translations: [String: String] = ["<left>": "h", "<right>": "l", "<up>": "k", "<down>": "j"]
6 var out = ""
7 func bind(_ keys: String, _ command: String, when: String?, mode: String) {
8 out += "[[bind]]\nkeys = \"\(keys.replacingOccurrences(of: "\\", with: "\\\\"))\"\ncommand = \"\(command)\"\n"
9 if let when { out += "when = \"\(when)\"\n" }
10 out += "mode = \"\(mode)\"\n"
11 }
12 for binding in emacs.bindings {
13 let first = binding.keys[0]
14 let keys = KeySequence.format(binding.keys)
15 let orgKey = first.key == "c" && first.modifiers == [.control] || first.key == "x" && first.modifiers == [.control]
16 || (first.modifiers.contains(.meta) && ["<left>", "<right>", "<up>", "<down>", "RET"].contains(first.key))
17 || (first.modifiers.contains(.shift) && ["<left>", "<right>", "<up>", "<down>"].contains(first.key))
18 || (first.modifiers == [.control] && first.key == "RET")
19 || keys == "M-x" || keys == "M-q"
20 guard orgKey else { continue }
21 for mode in ["normal", "insert", "visual"] { bind(keys, binding.command, when: binding.when, mode: mode) }
22 // evil-org: M-h/j/k/l and M-H/J/K/L in normal, visual and insert.
23 if binding.keys.count == 1, first.modifiers.contains(.meta), let letter = translations[first.key] {
24 let shifted = first.modifiers.contains(.shift)
25 let key = "M-" + (shifted ? letter.uppercased() : letter)
26 for mode in ["normal", "insert", "visual"] { bind(key, binding.command, when: binding.when, mode: mode) }
27 }
28 // Doom: C-S-h/j/k/l are org-shift* in normal and insert.
29 if binding.keys.count == 1, first.modifiers == [.shift], let letter = translations[first.key] {
30 for mode in ["normal", "insert"] { bind("C-" + letter.uppercased(), binding.command, when: binding.when, mode: mode) }
31 }
32 // evil-org insert state: C-t demotes, C-d promotes.
33 if binding.keys.count == 1, first.modifiers == [.meta], first.key == "<right>" || first.key == "<left>" {
34 bind(first.key == "<right>" ? "C-t" : "C-d", binding.command, when: binding.when, mode: "insert")
35 }
36 }
37 return out + doomBindings
38 }
39
40 static let doomBindings = """
41 # Leader
42 [[bind]]
43 keys = "SPC SPC"
44 command = "app.quick-open"
45 mode = "normal"
46 [[bind]]
47 keys = "SPC q q"
48 command = "app.quit"
49 mode = "normal"
50 [[bind]]
51 keys = "SPC ."
52 command = "app.quick-open"
53 mode = "normal"
54 [[bind]]
55 keys = "SPC f f"
56 command = "app.quick-open"
57 mode = "normal"
58 [[bind]]
59 keys = "SPC f s"
60 command = "app.save"
61 mode = "normal"
62 # Buffers
63 [[bind]]
64 keys = "SPC b b"
65 command = "app.buffer.switch"
66 mode = "normal"
67 [[bind]]
68 keys = "SPC b B"
69 command = "app.buffer.switch"
70 mode = "normal"
71 [[bind]]
72 keys = "SPC ,"
73 command = "app.buffer.switch"
74 mode = "normal"
75 [[bind]]
76 keys = "SPC `"
77 command = "app.buffer.last"
78 mode = "normal"
79 [[bind]]
80 keys = "SPC b k"
81 command = "app.buffer.kill"
82 mode = "normal"
83 [[bind]]
84 keys = "SPC b d"
85 command = "app.buffer.kill"
86 mode = "normal"
87 [[bind]]
88 keys = "SPC b K"
89 command = "app.buffer.kill-all"
90 mode = "normal"
91 [[bind]]
92 keys = "SPC b O"
93 command = "app.buffer.kill-others"
94 mode = "normal"
95 [[bind]]
96 keys = "SPC b n"
97 command = "app.buffer.next"
98 mode = "normal"
99 [[bind]]
100 keys = "SPC b p"
101 command = "app.buffer.previous"
102 mode = "normal"
103 [[bind]]
104 keys = "SPC b ]"
105 command = "app.buffer.next"
106 mode = "normal"
107 [[bind]]
108 keys = "SPC b ["
109 command = "app.buffer.previous"
110 mode = "normal"
111 [[bind]]
112 keys = "] b"
113 command = "app.buffer.next"
114 mode = "normal"
115 [[bind]]
116 keys = "[ b"
117 command = "app.buffer.previous"
118 mode = "normal"
119 [[bind]]
120 keys = "SPC b s"
121 command = "app.save"
122 mode = "normal"
123 [[bind]]
124 keys = "SPC b S"
125 command = "app.save-all"
126 mode = "normal"
127 [[bind]]
128 keys = "SPC s s"
129 command = "edit.find"
130 mode = "normal"
131 [[bind]]
132 keys = "SPC /"
133 command = "app.search"
134 mode = "normal"
135 [[bind]]
136 keys = "SPC s p"
137 command = "app.search"
138 mode = "normal"
139 [[bind]]
140 keys = "SPC :"
141 command = "app.palette"
142 mode = "normal"
143 [[bind]]
144 keys = "SPC o a"
145 command = "app.agenda"
146 mode = "normal"
147 [[bind]]
148 keys = "SPC X"
149 command = "app.capture"
150 mode = "normal"
151 [[bind]]
152 keys = "SPC z t"
153 command = "app.clock.report"
154 mode = "normal"
155 [[bind]]
156 keys = "SPC h r r"
157 command = "app.reload-keymap"
158 mode = "normal"
159 [[bind]]
160 keys = "SPC t s"
161 command = "editor.toggle-spell-check"
162 mode = "normal"
163 [[bind]]
164 keys = "SPC t w"
165 command = "editor.toggle-truncate-lines"
166 mode = "normal"
167
168 # Localleader (SPC m)
169 [[bind]]
170 keys = "SPC m '"
171 command = "org.edit-special"
172 mode = "normal"
173 [[bind]]
174 keys = "SPC m s c"
175 command = "org.subtree.clone"
176 mode = "normal"
177 [[bind]]
178 keys = "SPC m s d"
179 command = "org.subtree.cut"
180 mode = "normal"
181 [[bind]]
182 keys = "SPC m s S"
183 command = "org.sort"
184 mode = "normal"
185 [[bind]]
186 keys = "SPC m s n"
187 command = "org.narrow.subtree"
188 mode = "normal"
189 [[bind]]
190 keys = "SPC m s s"
191 command = "org.sparse-tree"
192 mode = "normal"
193 [[bind]]
194 keys = "SPC m s N"
195 command = "org.widen"
196 mode = "normal"
197 [[bind]]
198 keys = "SPC m ."
199 command = "org.goto"
200 mode = "normal"
201 [[bind]]
202 keys = "SPC m h"
203 command = "org.heading.toggle"
204 mode = "normal"
205 [[bind]]
206 keys = "SPC m i"
207 command = "org.item.toggle"
208 mode = "normal"
209 [[bind]]
210 keys = "SPC m l l"
211 command = "org.link.insert"
212 mode = "normal"
213 [[bind]]
214 keys = "SPC m l s"
215 command = "org.link.store"
216 mode = "normal"
217 [[bind]]
218 keys = "SPC m l i"
219 command = "org.id.store-link"
220 mode = "normal"
221 [[bind]]
222 keys = "SPC n l"
223 command = "org.link.store"
224 mode = "normal"
225 [[bind]]
226 keys = "SPC m t"
227 command = "org.todo.cycle"
228 mode = "normal"
229 [[bind]]
230 keys = "SPC m q"
231 command = "org.tags.set"
232 mode = "normal"
233 [[bind]]
234 keys = "SPC m x"
235 command = "org.checkbox.toggle"
236 mode = "normal"
237 [[bind]]
238 keys = "SPC m A"
239 command = "app.archive"
240 mode = "normal"
241 [[bind]]
242 keys = "SPC m e h h"
243 command = "app.export.html"
244 mode = "normal"
245 [[bind]]
246 keys = "SPC m e h o"
247 command = "app.export.html-open"
248 mode = "normal"
249 [[bind]]
250 keys = "SPC m e m m"
251 command = "app.export.markdown"
252 mode = "normal"
253 [[bind]]
254 keys = "SPC m e l p"
255 command = "app.export.pdf"
256 mode = "normal"
257 [[bind]]
258 keys = "SPC m d d"
259 command = "org.deadline"
260 mode = "normal"
261 [[bind]]
262 keys = "SPC m d s"
263 command = "org.schedule"
264 mode = "normal"
265 [[bind]]
266 keys = "SPC m d t"
267 command = "org.timestamp.active"
268 mode = "normal"
269 [[bind]]
270 keys = "SPC m d T"
271 command = "org.timestamp.inactive"
272 mode = "normal"
273 [[bind]]
274 keys = "SPC m r r"
275 command = "app.refile"
276 mode = "normal"
277 [[bind]]
278 keys = "SPC m s r"
279 command = "app.refile"
280 mode = "normal"
281 [[bind]]
282 keys = "SPC m s A"
283 command = "app.archive"
284 mode = "normal"
285 [[bind]]
286 keys = "SPC m s a"
287 command = "org.archive.toggle-tag"
288 mode = "normal"
289 [[bind]]
290 keys = "SPC m s h"
291 command = "org.subtree.promote"
292 mode = "normal"
293 [[bind]]
294 keys = "SPC m s l"
295 command = "org.subtree.demote"
296 mode = "normal"
297 [[bind]]
298 keys = "SPC m s j"
299 command = "org.subtree.down"
300 mode = "normal"
301 [[bind]]
302 keys = "SPC m s k"
303 command = "org.subtree.up"
304 mode = "normal"
305 [[bind]]
306 keys = "SPC m c i"
307 command = "app.clock.in"
308 mode = "normal"
309 [[bind]]
310 keys = "SPC m c o"
311 command = "app.clock.out"
312 mode = "normal"
313 [[bind]]
314 keys = "SPC m c c"
315 command = "app.clock.cancel"
316 mode = "normal"
317 [[bind]]
318 keys = "SPC m c g"
319 command = "app.clock.goto"
320 mode = "normal"
321 [[bind]]
322 keys = "SPC m c G"
323 command = "app.clock.goto-recent"
324 mode = "normal"
325 [[bind]]
326 keys = "SPC m c I"
327 command = "app.clock.in-last"
328 mode = "normal"
329 [[bind]]
330 keys = "SPC m c d"
331 command = "app.clock.default"
332 mode = "normal"
333 [[bind]]
334 keys = "SPC m c r"
335 command = "app.clock.resolve"
336 mode = "normal"
337 [[bind]]
338 keys = "SPC m c R"
339 command = "app.clock.report"
340 mode = "normal"
341 [[bind]]
342 keys = "SPC m c E"
343 command = "org.effort.set"
344 mode = "normal"
345 [[bind]]
346 keys = "SPC m p p"
347 command = "org.priority.set"
348 mode = "normal"
349 [[bind]]
350 keys = "SPC m o"
351 command = "org.property.read-and-set"
352 mode = "normal"
353 [[bind]]
354 keys = "SPC m p u"
355 command = "org.priority.up"
356 mode = "normal"
357 [[bind]]
358 keys = "SPC m p d"
359 command = "org.priority.down"
360 mode = "normal"
361 [[bind]]
362 keys = "SPC m b -"
363 command = "org.table.insert-hline"
364 mode = "normal"
365 [[bind]]
366 keys = "SPC m b a"
367 command = "org.table.align"
368 mode = "normal"
369 [[bind]]
370 keys = "SPC m b r"
371 command = "org.table.recalc-all"
372 mode = "normal"
373 [[bind]]
374 keys = "SPC m b d c"
375 command = "org.table.delete-column"
376 mode = "normal"
377 [[bind]]
378 keys = "SPC m b d r"
379 command = "org.table.kill-row"
380 mode = "normal"
381 [[bind]]
382 keys = "SPC m b i c"
383 command = "org.table.insert-column"
384 mode = "normal"
385 [[bind]]
386 keys = "SPC m b i r"
387 command = "org.table.insert-row"
388 mode = "normal"
389 [[bind]]
390 keys = "SPC m b i h"
391 command = "org.table.insert-hline"
392 mode = "normal"
393
394 # evil-org and Doom's org keys
395 [[bind]]
396 keys = "TAB"
397 command = "org.cycle"
398 mode = "normal"
399 [[bind]]
400 keys = "S-TAB"
401 command = "org.cycle-global"
402 mode = "normal"
403 [[bind]]
404 keys = "RET"
405 command = "org.dwim"
406 mode = "normal"
407 [[bind]]
408 keys = "z a"
409 command = "org.fold.toggle"
410 mode = "normal"
411 [[bind]]
412 keys = "z c"
413 command = "org.fold.close"
414 mode = "normal"
415 [[bind]]
416 keys = "z o"
417 command = "org.fold.open"
418 mode = "normal"
419 [[bind]]
420 keys = "z A"
421 command = "org.cycle-global"
422 mode = "normal"
423 [[bind]]
424 keys = "g h"
425 command = "org.heading.up"
426 mode = "normal"
427 [[bind]]
428 keys = "] h"
429 command = "org.heading.forward-same-level"
430 mode = "normal"
431 [[bind]]
432 keys = "[ h"
433 command = "org.heading.backward-same-level"
434 mode = "normal"
435 [[bind]]
436 keys = "RET"
437 command = "org.table.next-row"
438 when = "table"
439 mode = "insert"
440 [[bind]]
441 keys = "TAB"
442 command = "org.cycle"
443 mode = "visual"
444 [[bind]]
445 keys = "S-TAB"
446 command = "org.cycle-global"
447 mode = "visual"
448
449 # Doom's corfu: completion-at-point in insert state.
450 [[bind]]
451 keys = "C-SPC"
452 command = "editor.complete"
453 mode = "insert"
454 [[bind]]
455 keys = "C-@"
456 command = "editor.complete"
457 mode = "insert"
458
459 # Insert state: org-cycle and org-shifttab with Doom's +org-indent-maybe-h, which
460 # demotes or promotes a heading and indents or outdents an item tree.
461 [[bind]]
462 keys = "S-TAB"
463 command = "org.cycle-global"
464 mode = "insert"
465 [[bind]]
466 keys = "TAB"
467 command = "org.table.next-field"
468 when = "table"
469 mode = "insert"
470 [[bind]]
471 keys = "S-TAB"
472 command = "org.table.previous-field"
473 when = "table"
474 mode = "insert"
475 [[bind]]
476 keys = "TAB"
477 command = "org.item.indent-tree"
478 when = "item"
479 mode = "insert"
480 [[bind]]
481 keys = "S-TAB"
482 command = "org.item.outdent-tree"
483 when = "item"
484 mode = "insert"
485 [[bind]]
486 keys = "TAB"
487 command = "org.heading.demote"
488 when = "heading"
489 mode = "insert"
490 [[bind]]
491 keys = "S-TAB"
492 command = "org.heading.promote"
493 when = "heading"
494 mode = "insert"
495
496 """
497}
Sources/OrgCore/Keymap/PresetEmacs.swift added +513
@@ -0,0 +1,513 @@
1extension KeymapPreset {
2 static let emacsBindings = """
3 # Movement and editing. With a mark set (C-SPC), movement extends the region.
4 [[bind]]
5 keys = "C-f"
6 command = "edit.forward-char"
7 [[bind]]
8 keys = "C-b"
9 command = "edit.backward-char"
10 [[bind]]
11 keys = "C-n"
12 command = "edit.next-line"
13 [[bind]]
14 keys = "C-p"
15 command = "edit.previous-line"
16 [[bind]]
17 keys = "C-a"
18 command = "edit.beginning-of-line"
19 [[bind]]
20 keys = "C-e"
21 command = "edit.end-of-line"
22 [[bind]]
23 keys = "M-f"
24 command = "edit.forward-word"
25 [[bind]]
26 keys = "M-b"
27 command = "edit.backward-word"
28 [[bind]]
29 keys = "M-<"
30 command = "edit.beginning-of-buffer"
31 [[bind]]
32 keys = "M->"
33 command = "edit.end-of-buffer"
34 [[bind]]
35 keys = "C-v"
36 command = "edit.scroll-up"
37 [[bind]]
38 keys = "M-v"
39 command = "edit.scroll-down"
40 [[bind]]
41 keys = "C-l"
42 command = "edit.recenter"
43 [[bind]]
44 keys = "C-d"
45 command = "edit.delete-char"
46 [[bind]]
47 keys = "M-d"
48 command = "edit.kill-word"
49 [[bind]]
50 keys = "M-DEL"
51 command = "edit.backward-kill-word"
52 [[bind]]
53 keys = "C-k"
54 command = "edit.kill-line"
55 [[bind]]
56 keys = "C-y"
57 command = "edit.yank"
58 [[bind]]
59 keys = "C-SPC"
60 command = "edit.set-mark"
61 [[bind]]
62 keys = "C-M-i"
63 command = "editor.complete"
64 [[bind]]
65 keys = "C-x h"
66 command = "edit.select-all"
67 [[bind]]
68 keys = "C-w"
69 command = "edit.kill-region"
70 [[bind]]
71 keys = "M-w"
72 command = "edit.copy-region"
73 [[bind]]
74 keys = "C-/"
75 command = "edit.undo"
76 [[bind]]
77 keys = "C-_"
78 command = "edit.undo"
79 [[bind]]
80 keys = "C-x u"
81 command = "edit.undo"
82 [[bind]]
83 keys = "C-g"
84 command = "edit.keyboard-quit"
85 [[bind]]
86 keys = "C-t"
87 command = "edit.transpose-chars"
88 [[bind]]
89 keys = "C-s"
90 command = "edit.find"
91 [[bind]]
92 keys = "C-r"
93 command = "edit.find"
94 [[bind]]
95 keys = "M-%"
96 command = "edit.replace"
97
98 # Files and commands
99 [[bind]]
100 keys = "C-x C-s"
101 command = "app.save"
102 [[bind]]
103 keys = "C-c C-o"
104 command = "org.link.open"
105 [[bind]]
106 keys = "C-c C-l"
107 command = "org.link.insert"
108 [[bind]]
109 keys = "C-c l"
110 command = "org.link.store"
111 [[bind]]
112 keys = "C-c ;"
113 command = "org.heading.toggle-comment"
114 [[bind]]
115 keys = "C-c *"
116 command = "org.heading.toggle"
117 [[bind]]
118 keys = "C-c -"
119 command = "org.item.toggle"
120 [[bind]]
121 keys = "C-c @"
122 command = "org.subtree.mark"
123 [[bind]]
124 keys = "C-c C-x C-w"
125 command = "org.subtree.cut"
126 [[bind]]
127 keys = "C-c C-x M-w"
128 command = "org.subtree.copy"
129 [[bind]]
130 keys = "C-c C-x C-y"
131 command = "org.subtree.paste"
132 [[bind]]
133 keys = "C-c C-x c"
134 command = "org.subtree.clone"
135 [[bind]]
136 keys = "C-c ^"
137 command = "org.sort"
138 [[bind]]
139 keys = "C-c C-c"
140 command = "org.ctrl-c-ctrl-c"
141 [[bind]]
142 keys = "C-c C-y"
143 command = "org.timestamp.evaluate-range"
144 [[bind]]
145 keys = "C-c C-x f"
146 command = "org.footnote.action"
147 [[bind]]
148 keys = "C-c ="
149 command = "org.table.column-formula"
150 [[bind]]
151 keys = "C-c TAB"
152 command = "org.table.toggle-column-width"
153 when = "table"
154 [[bind]]
155 keys = "C-x n s"
156 command = "org.narrow.subtree"
157 [[bind]]
158 keys = "C-x n b"
159 command = "org.narrow.block"
160 [[bind]]
161 keys = "C-x n w"
162 command = "org.widen"
163 [[bind]]
164 keys = "C-x x t"
165 command = "editor.toggle-truncate-lines"
166 [[bind]]
167 keys = "C-c C-j"
168 command = "org.goto"
169 [[bind]]
170 keys = "C-c /"
171 command = "org.sparse-tree"
172 [[bind]]
173 keys = "C-c ,"
174 command = "org.priority.set"
175 [[bind]]
176 keys = "C-c C-x p"
177 command = "org.property.read-and-set"
178 [[bind]]
179 keys = "C-c C-x i"
180 command = "org.columns.insert-dblock"
181 [[bind]]
182 keys = "C-c C-x a"
183 command = "org.archive.toggle-tag"
184 [[bind]]
185 keys = "C-c C-x A"
186 command = "org.archive.to-sibling"
187 [[bind]]
188 keys = "C-c C-x o"
189 command = "org.property.toggle-ordered"
190 [[bind]]
191 keys = "C-c C-x C-v"
192 command = "org.toggle-inline-images"
193 [[bind]]
194 keys = "C-c C-x C-c"
195 command = "org.columns"
196 [[bind]]
197 keys = "S-<right>"
198 command = "org.property.next-value"
199 when = "property"
200 [[bind]]
201 keys = "S-<left>"
202 command = "org.property.previous-value"
203 when = "property"
204 [[bind]]
205 keys = "C-c C-x C-r"
206 command = "org.clock.report"
207 [[bind]]
208 keys = "C-c C-x C-u"
209 command = "org.dblock.update"
210 [[bind]]
211 keys = "C-c C-x e"
212 command = "org.effort.set"
213 [[bind]]
214 keys = "C-c C-c"
215 command = "org.dblock.update"
216 when = "dblock"
217 [[bind]]
218 keys = "C-c C-,"
219 command = "org.structure-template"
220 [[bind]]
221 keys = "C-c '"
222 command = "org.edit-special"
223 [[bind]]
224 keys = "C-c C-v t"
225 command = "org.babel.tangle"
226 [[bind]]
227 keys = "C-c C-v C-t"
228 command = "org.babel.tangle"
229 [[bind]]
230 keys = "C-c `"
231 command = "org.table.edit-field"
232 when = "table"
233 [[bind]]
234 keys = "C-x b"
235 command = "app.buffer.switch"
236 [[bind]]
237 keys = "C-x C-b"
238 command = "app.buffer.switch"
239 [[bind]]
240 keys = "C-x k"
241 command = "app.buffer.kill"
242 [[bind]]
243 keys = "C-x <right>"
244 command = "app.buffer.next"
245 [[bind]]
246 keys = "C-x <left>"
247 command = "app.buffer.previous"
248 [[bind]]
249 keys = "C-x s"
250 command = "app.save-all"
251 [[bind]]
252 keys = "C-x C-f"
253 command = "app.quick-open"
254 [[bind]]
255 keys = "M-x"
256 command = "app.palette"
257 [[bind]]
258 keys = "C-c a"
259 command = "app.agenda"
260 [[bind]]
261 keys = "C-c c"
262 command = "app.capture"
263 [[bind]]
264 keys = "C-c C-x C-i"
265 command = "app.clock.in"
266 [[bind]]
267 keys = "C-c C-x C-o"
268 command = "app.clock.out"
269 [[bind]]
270 keys = "C-c C-x C-q"
271 command = "app.clock.cancel"
272 [[bind]]
273 keys = "C-c C-x C-j"
274 command = "app.clock.goto"
275 [[bind]]
276 keys = "C-c C-x C-x"
277 command = "app.clock.in-last"
278 [[bind]]
279 keys = "C-c C-x C-z"
280 command = "app.clock.resolve"
281 [[bind]]
282 keys = "C-c C-e h h"
283 command = "app.export.html"
284 [[bind]]
285 keys = "C-c C-e h o"
286 command = "app.export.html-open"
287 [[bind]]
288 keys = "C-c C-e m m"
289 command = "app.export.markdown"
290 [[bind]]
291 keys = "C-c C-e l p"
292 command = "app.export.pdf"
293 [[bind]]
294 keys = "C-c C-e l l"
295 command = "app.export.latex"
296 [[bind]]
297 keys = "C-c C-e o o"
298 command = "app.export.odt"
299 [[bind]]
300 keys = "C-c C-e t u"
301 command = "app.export.text"
302
303 # Org
304 [[bind]]
305 keys = "C-c C-t"
306 command = "org.todo.cycle"
307 [[bind]]
308 keys = "S-<right>"
309 command = "org.todo.next"
310 when = "heading"
311 [[bind]]
312 keys = "S-<left>"
313 command = "org.todo.previous"
314 when = "heading"
315 [[bind]]
316 keys = "S-<up>"
317 command = "org.priority.up"
318 when = "heading"
319 [[bind]]
320 keys = "S-<down>"
321 command = "org.priority.down"
322 when = "heading"
323 [[bind]]
324 keys = "M-<left>"
325 command = "org.heading.promote"
326 when = "heading"
327 [[bind]]
328 keys = "M-<right>"
329 command = "org.heading.demote"
330 when = "heading"
331 [[bind]]
332 keys = "M-S-<left>"
333 command = "org.subtree.promote"
334 when = "heading"
335 [[bind]]
336 keys = "M-S-<right>"
337 command = "org.subtree.demote"
338 when = "heading"
339 [[bind]]
340 keys = "M-<up>"
341 command = "org.subtree.up"
342 when = "heading"
343 [[bind]]
344 keys = "M-<down>"
345 command = "org.subtree.down"
346 when = "heading"
347 [[bind]]
348 keys = "M-RET"
349 command = "org.heading.insert"
350 [[bind]]
351 keys = "C-RET"
352 command = "org.heading.insert-after-subtree"
353 [[bind]]
354 keys = "M-S-RET"
355 command = "org.heading.insert-todo"
356 [[bind]]
357 keys = "C-c C-n"
358 command = "org.heading.next"
359 [[bind]]
360 keys = "C-c C-p"
361 command = "org.heading.previous"
362 [[bind]]
363 keys = "C-c C-f"
364 command = "org.heading.forward-same-level"
365 [[bind]]
366 keys = "C-c C-b"
367 command = "org.heading.backward-same-level"
368 [[bind]]
369 keys = "C-c C-u"
370 command = "org.heading.up"
371 [[bind]]
372 keys = "C-c C-q"
373 command = "org.tags.set"
374 [[bind]]
375 keys = "M-RET"
376 command = "org.item.insert"
377 when = "item"
378 [[bind]]
379 keys = "M-S-RET"
380 command = "org.item.insert-checkbox"
381 when = "item"
382 [[bind]]
383 keys = "M-<left>"
384 command = "org.item.outdent"
385 when = "item"
386 [[bind]]
387 keys = "M-<right>"
388 command = "org.item.indent"
389 when = "item"
390 [[bind]]
391 keys = "M-S-<left>"
392 command = "org.item.outdent-tree"
393 when = "item"
394 [[bind]]
395 keys = "M-S-<right>"
396 command = "org.item.indent-tree"
397 when = "item"
398 [[bind]]
399 keys = "M-<up>"
400 command = "org.item.up"
401 when = "item"
402 [[bind]]
403 keys = "M-<down>"
404 command = "org.item.down"
405 when = "item"
406 [[bind]]
407 keys = "C-c C-c"
408 command = "org.ctrl-c-ctrl-c"
409 when = "item"
410 [[bind]]
411 keys = "C-c C-x C-b"
412 command = "org.checkbox.toggle"
413 [[bind]]
414 keys = "C-c C-w"
415 command = "app.refile"
416 [[bind]]
417 keys = "C-c C-x C-s"
418 command = "app.archive"
419 [[bind]]
420 keys = "C-c $"
421 command = "app.archive"
422 [[bind]]
423 keys = "C-c ."
424 command = "org.timestamp.active"
425 [[bind]]
426 keys = "C-c !"
427 command = "org.timestamp.inactive"
428 [[bind]]
429 keys = "C-c C-s"
430 command = "org.schedule"
431 [[bind]]
432 keys = "C-c C-d"
433 command = "org.deadline"
434 [[bind]]
435 keys = "M-q"
436 command = "org.fill-paragraph"
437 [[bind]]
438 keys = "C-c C-c"
439 command = "org.ctrl-c-ctrl-c"
440 when = "table"
441 [[bind]]
442 keys = "C-c C-c"
443 command = "org.table.recalc-all"
444 when = "tblfm"
445 [[bind]]
446 keys = "C-c *"
447 command = "org.table.recalc"
448 when = "table"
449 [[bind]]
450 keys = "C-c C-c"
451 command = "org.babel.execute"
452 when = "src"
453 [[bind]]
454 keys = "M-<up>"
455 command = "org.table.row-up"
456 when = "table"
457 [[bind]]
458 keys = "M-<down>"
459 command = "org.table.row-down"
460 when = "table"
461 [[bind]]
462 keys = "M-<left>"
463 command = "org.table.column-left"
464 when = "table"
465 [[bind]]
466 keys = "M-<right>"
467 command = "org.table.column-right"
468 when = "table"
469 [[bind]]
470 keys = "M-S-<right>"
471 command = "org.table.insert-column"
472 when = "table"
473 [[bind]]
474 keys = "M-S-<left>"
475 command = "org.table.delete-column"
476 when = "table"
477 [[bind]]
478 keys = "M-S-<up>"
479 command = "org.table.kill-row"
480 when = "table"
481 [[bind]]
482 keys = "M-S-<down>"
483 command = "org.table.insert-row"
484 when = "table"
485 [[bind]]
486 keys = "C-c -"
487 command = "org.table.insert-hline"
488 when = "table"
489 [[bind]]
490 keys = "C-c |"
491 command = "org.table.create"
492 [[bind]]
493 keys = "S-<up>"
494 command = "org.timestamp.up"
495 when = "timestamp"
496 [[bind]]
497 keys = "S-<down>"
498 command = "org.timestamp.down"
499 when = "timestamp"
500 [[bind]]
501 keys = "S-<right>"
502 command = "org.timestamp.day-later"
503 when = "timestamp"
504 [[bind]]
505 keys = "S-<left>"
506 command = "org.timestamp.day-earlier"
507 when = "timestamp"
508
509 """
510
511 /// Standard Mac text keys stay as they are; org commands use Control-Command chords, which
512 /// macOS text editing leaves free.
513}
Sources/OrgCore/Keymap/PresetMac.swift added +270
@@ -0,0 +1,270 @@
1extension KeymapPreset {
2 static let macBindings = """
3 [[bind]]
4 keys = "C-TAB"
5 command = "app.buffer.next"
6 [[bind]]
7 keys = "C-S-TAB"
8 command = "app.buffer.previous"
9 [[bind]]
10 keys = "C-s-t"
11 command = "org.todo.cycle"
12 [[bind]]
13 keys = "C-s-<up>"
14 command = "org.priority.up"
15 [[bind]]
16 keys = "C-s-<down>"
17 command = "org.priority.down"
18 [[bind]]
19 keys = "C-s-<left>"
20 command = "org.heading.promote"
21 [[bind]]
22 keys = "C-s-<right>"
23 command = "org.heading.demote"
24 [[bind]]
25 keys = "C-M-s-<left>"
26 command = "org.subtree.promote"
27 [[bind]]
28 keys = "C-M-s-<right>"
29 command = "org.subtree.demote"
30 [[bind]]
31 keys = "C-M-s-<up>"
32 command = "org.subtree.up"
33 [[bind]]
34 keys = "C-M-s-<down>"
35 command = "org.subtree.down"
36 [[bind]]
37 keys = "s-RET"
38 command = "org.heading.insert"
39 [[bind]]
40 keys = "C-s-RET"
41 command = "org.heading.insert-after-subtree"
42 [[bind]]
43 keys = "s-S-RET"
44 command = "org.heading.insert-todo"
45 [[bind]]
46 keys = "M-s-<down>"
47 command = "org.heading.next"
48 [[bind]]
49 keys = "M-s-<up>"
50 command = "org.heading.previous"
51 [[bind]]
52 keys = "C-s-g"
53 command = "org.tags.set"
54 [[bind]]
55 keys = "s-RET"
56 command = "org.item.insert"
57 when = "item"
58 [[bind]]
59 keys = "s-S-RET"
60 command = "org.item.insert-checkbox"
61 when = "item"
62 [[bind]]
63 keys = "C-s-<left>"
64 command = "org.item.outdent"
65 when = "item"
66 [[bind]]
67 keys = "C-s-<right>"
68 command = "org.item.indent"
69 when = "item"
70 [[bind]]
71 keys = "C-M-s-<left>"
72 command = "org.item.outdent-tree"
73 when = "item"
74 [[bind]]
75 keys = "C-M-s-<right>"
76 command = "org.item.indent-tree"
77 when = "item"
78 [[bind]]
79 keys = "C-M-s-<up>"
80 command = "org.item.up"
81 when = "item"
82 [[bind]]
83 keys = "C-M-s-<down>"
84 command = "org.item.down"
85 when = "item"
86 [[bind]]
87 keys = "C-s-c"
88 command = "org.checkbox.toggle"
89 [[bind]]
90 keys = "C-s-w"
91 command = "app.refile"
92 [[bind]]
93 keys = "C-s-a"
94 command = "app.archive"
95 [[bind]]
96 keys = "C-s-."
97 command = "org.timestamp.active"
98 [[bind]]
99 keys = "C-M-s-."
100 command = "org.timestamp.inactive"
101 [[bind]]
102 keys = "C-s-s"
103 command = "org.schedule"
104 [[bind]]
105 keys = "C-s-e"
106 command = "org.deadline"
107 [[bind]]
108 keys = "C-s-p"
109 command = "org.fill-paragraph"
110 [[bind]]
111 keys = "C-s-<up>"
112 command = "org.table.row-up"
113 when = "table"
114 [[bind]]
115 keys = "C-s-<down>"
116 command = "org.table.row-down"
117 when = "table"
118 [[bind]]
119 keys = "C-s-<left>"
120 command = "org.table.column-left"
121 when = "table"
122 [[bind]]
123 keys = "C-s-<right>"
124 command = "org.table.column-right"
125 when = "table"
126 [[bind]]
127 keys = "C-M-s-<right>"
128 command = "org.table.insert-column"
129 when = "table"
130 [[bind]]
131 keys = "C-M-s-<left>"
132 command = "org.table.delete-column"
133 when = "table"
134 [[bind]]
135 keys = "C-M-s-<up>"
136 command = "org.table.kill-row"
137 when = "table"
138 [[bind]]
139 keys = "C-M-s-<down>"
140 command = "org.table.insert-row"
141 when = "table"
142 [[bind]]
143 keys = "C-s--"
144 command = "org.table.insert-hline"
145 when = "table"
146 [[bind]]
147 keys = "C-s-*"
148 command = "org.table.recalc"
149 when = "table"
150 [[bind]]
151 keys = "C-s-\\\\"
152 command = "org.table.create"
153 [[bind]]
154 keys = "C-s-<up>"
155 command = "org.timestamp.up"
156 when = "timestamp"
157 [[bind]]
158 keys = "C-s-<down>"
159 command = "org.timestamp.down"
160 when = "timestamp"
161 [[bind]]
162 keys = "C-s-<right>"
163 command = "org.timestamp.day-later"
164 when = "timestamp"
165 [[bind]]
166 keys = "C-s-<left>"
167 command = "org.timestamp.day-earlier"
168 when = "timestamp"
169
170 # Act at point, links, clocking, export and the rest of C-c.
171 [[bind]]
172 keys = "C-s-x"
173 command = "org.ctrl-c-ctrl-c"
174 [[bind]]
175 keys = "C-s-x"
176 command = "org.dblock.update"
177 when = "dblock"
178 [[bind]]
179 keys = "C-s-x"
180 command = "org.table.recalc-all"
181 when = "tblfm"
182 [[bind]]
183 keys = "C-s-x"
184 command = "org.babel.execute"
185 when = "src"
186 [[bind]]
187 keys = "s-k"
188 command = "org.link.insert"
189 [[bind]]
190 keys = "C-s-o"
191 command = "org.link.open"
192 [[bind]]
193 keys = "C-s-l"
194 command = "org.link.store"
195 [[bind]]
196 keys = "C-s-i"
197 command = "app.clock.in"
198 [[bind]]
199 keys = "C-S-s-i"
200 command = "app.clock.out"
201 [[bind]]
202 keys = "C-s-j"
203 command = "app.clock.goto"
204 [[bind]]
205 keys = "C-M-s-i"
206 command = "app.clock.in-recent"
207 [[bind]]
208 keys = "C-M-s-j"
209 command = "app.clock.goto-recent"
210 [[bind]]
211 keys = "C-s-k"
212 command = "app.clock.cancel"
213 [[bind]]
214 keys = "s-S-e"
215 command = "app.export-dialog"
216 [[bind]]
217 keys = "C-s-n"
218 command = "org.narrow.toggle"
219 [[bind]]
220 keys = "C-S-s-s"
221 command = "org.sort"
222 [[bind]]
223 keys = "C-S-s-p"
224 command = "org.property.read-and-set"
225 [[bind]]
226 keys = "C-S-s-f"
227 command = "org.footnote.action"
228 [[bind]]
229 keys = "C-s-'"
230 command = "org.edit-special"
231 [[bind]]
232 keys = "C-S-s-<right>"
233 command = "org.todo.next"
234 when = "heading"
235 [[bind]]
236 keys = "C-S-s-<left>"
237 command = "org.todo.previous"
238 when = "heading"
239 [[bind]]
240 keys = "C-S-s-<right>"
241 command = "org.property.next-value"
242 when = "property"
243 [[bind]]
244 keys = "C-S-s-<left>"
245 command = "org.property.previous-value"
246 when = "property"
247 [[bind]]
248 keys = "M-S-s-<down>"
249 command = "org.heading.forward-same-level"
250 [[bind]]
251 keys = "M-S-s-<up>"
252 command = "org.heading.backward-same-level"
253 [[bind]]
254 keys = "C-S-s-e"
255 command = "org.effort.set"
256 [[bind]]
257 keys = "C-s-,"
258 command = "org.priority.set"
259 [[bind]]
260 keys = "C-s-v"
261 command = "org.babel.tangle"
262 [[bind]]
263 keys = "C-S-s-v"
264 command = "org.babel.tangle-block"
265 [[bind]]
266 keys = "C-M-s-v"
267 command = "org.babel.tangle-target"
268
269 """
270}
Sources/OrgCore/Keymap/Presets.swift −1276
@@ -50,503 +50,6 @@ public enum KeymapPreset: String, Sendable, CaseIterable {
5050
5151 /// Doom: the Emacs preset's org bindings in every evil state (as org-mode-map's are), with
5252 /// evil-org's `M-h/j/k/l` forms, then Doom's leader, localleader and evil-org keys.
53 static var doomToml: String {
54 var problems: [String] = []
55 let emacs = try! Keymap(toml: common + emacsBindings, problems: &problems)
56 let translations: [String: String] = ["<left>": "h", "<right>": "l", "<up>": "k", "<down>": "j"]
57 var out = ""
58 func bind(_ keys: String, _ command: String, when: String?, mode: String) {
59 out += "[[bind]]\nkeys = \"\(keys.replacingOccurrences(of: "\\", with: "\\\\"))\"\ncommand = \"\(command)\"\n"
60 if let when { out += "when = \"\(when)\"\n" }
61 out += "mode = \"\(mode)\"\n"
62 }
63 for binding in emacs.bindings {
64 let first = binding.keys[0]
65 let keys = KeySequence.format(binding.keys)
66 let orgKey = first.key == "c" && first.modifiers == [.control] || first.key == "x" && first.modifiers == [.control]
67 || (first.modifiers.contains(.meta) && ["<left>", "<right>", "<up>", "<down>", "RET"].contains(first.key))
68 || (first.modifiers.contains(.shift) && ["<left>", "<right>", "<up>", "<down>"].contains(first.key))
69 || (first.modifiers == [.control] && first.key == "RET")
70 || keys == "M-x" || keys == "M-q"
71 guard orgKey else { continue }
72 for mode in ["normal", "insert", "visual"] { bind(keys, binding.command, when: binding.when, mode: mode) }
73 // evil-org: M-h/j/k/l and M-H/J/K/L in normal, visual and insert.
74 if binding.keys.count == 1, first.modifiers.contains(.meta), let letter = translations[first.key] {
75 let shifted = first.modifiers.contains(.shift)
76 let key = "M-" + (shifted ? letter.uppercased() : letter)
77 for mode in ["normal", "insert", "visual"] { bind(key, binding.command, when: binding.when, mode: mode) }
78 }
79 // Doom: C-S-h/j/k/l are org-shift* in normal and insert.
80 if binding.keys.count == 1, first.modifiers == [.shift], let letter = translations[first.key] {
81 for mode in ["normal", "insert"] { bind("C-" + letter.uppercased(), binding.command, when: binding.when, mode: mode) }
82 }
83 // evil-org insert state: C-t demotes, C-d promotes.
84 if binding.keys.count == 1, first.modifiers == [.meta], first.key == "<right>" || first.key == "<left>" {
85 bind(first.key == "<right>" ? "C-t" : "C-d", binding.command, when: binding.when, mode: "insert")
86 }
87 }
88 return out + doomBindings
89 }
90
91 static let doomBindings = """
92 # Leader
93 [[bind]]
94 keys = "SPC SPC"
95 command = "app.quick-open"
96 mode = "normal"
97 [[bind]]
98 keys = "SPC q q"
99 command = "app.quit"
100 mode = "normal"
101 [[bind]]
102 keys = "SPC ."
103 command = "app.quick-open"
104 mode = "normal"
105 [[bind]]
106 keys = "SPC f f"
107 command = "app.quick-open"
108 mode = "normal"
109 [[bind]]
110 keys = "SPC f s"
111 command = "app.save"
112 mode = "normal"
113 # Buffers
114 [[bind]]
115 keys = "SPC b b"
116 command = "app.buffer.switch"
117 mode = "normal"
118 [[bind]]
119 keys = "SPC b B"
120 command = "app.buffer.switch"
121 mode = "normal"
122 [[bind]]
123 keys = "SPC ,"
124 command = "app.buffer.switch"
125 mode = "normal"
126 [[bind]]
127 keys = "SPC `"
128 command = "app.buffer.last"
129 mode = "normal"
130 [[bind]]
131 keys = "SPC b k"
132 command = "app.buffer.kill"
133 mode = "normal"
134 [[bind]]
135 keys = "SPC b d"
136 command = "app.buffer.kill"
137 mode = "normal"
138 [[bind]]
139 keys = "SPC b K"
140 command = "app.buffer.kill-all"
141 mode = "normal"
142 [[bind]]
143 keys = "SPC b O"
144 command = "app.buffer.kill-others"
145 mode = "normal"
146 [[bind]]
147 keys = "SPC b n"
148 command = "app.buffer.next"
149 mode = "normal"
150 [[bind]]
151 keys = "SPC b p"
152 command = "app.buffer.previous"
153 mode = "normal"
154 [[bind]]
155 keys = "SPC b ]"
156 command = "app.buffer.next"
157 mode = "normal"
158 [[bind]]
159 keys = "SPC b ["
160 command = "app.buffer.previous"
161 mode = "normal"
162 [[bind]]
163 keys = "] b"
164 command = "app.buffer.next"
165 mode = "normal"
166 [[bind]]
167 keys = "[ b"
168 command = "app.buffer.previous"
169 mode = "normal"
170 [[bind]]
171 keys = "SPC b s"
172 command = "app.save"
173 mode = "normal"
174 [[bind]]
175 keys = "SPC b S"
176 command = "app.save-all"
177 mode = "normal"
178 [[bind]]
179 keys = "SPC s s"
180 command = "edit.find"
181 mode = "normal"
182 [[bind]]
183 keys = "SPC /"
184 command = "app.search"
185 mode = "normal"
186 [[bind]]
187 keys = "SPC s p"
188 command = "app.search"
189 mode = "normal"
190 [[bind]]
191 keys = "SPC :"
192 command = "app.palette"
193 mode = "normal"
194 [[bind]]
195 keys = "SPC o a"
196 command = "app.agenda"
197 mode = "normal"
198 [[bind]]
199 keys = "SPC X"
200 command = "app.capture"
201 mode = "normal"
202 [[bind]]
203 keys = "SPC z t"
204 command = "app.clock.report"
205 mode = "normal"
206 [[bind]]
207 keys = "SPC h r r"
208 command = "app.reload-keymap"
209 mode = "normal"
210 [[bind]]
211 keys = "SPC t s"
212 command = "editor.toggle-spell-check"
213 mode = "normal"
214 [[bind]]
215 keys = "SPC t w"
216 command = "editor.toggle-truncate-lines"
217 mode = "normal"
218
219 # Localleader (SPC m)
220 [[bind]]
221 keys = "SPC m '"
222 command = "org.edit-special"
223 mode = "normal"
224 [[bind]]
225 keys = "SPC m s c"
226 command = "org.subtree.clone"
227 mode = "normal"
228 [[bind]]
229 keys = "SPC m s d"
230 command = "org.subtree.cut"
231 mode = "normal"
232 [[bind]]
233 keys = "SPC m s S"
234 command = "org.sort"
235 mode = "normal"
236 [[bind]]
237 keys = "SPC m s n"
238 command = "org.narrow.subtree"
239 mode = "normal"
240 [[bind]]
241 keys = "SPC m s s"
242 command = "org.sparse-tree"
243 mode = "normal"
244 [[bind]]
245 keys = "SPC m s N"
246 command = "org.widen"
247 mode = "normal"
248 [[bind]]
249 keys = "SPC m ."
250 command = "org.goto"
251 mode = "normal"
252 [[bind]]
253 keys = "SPC m h"
254 command = "org.heading.toggle"
255 mode = "normal"
256 [[bind]]
257 keys = "SPC m i"
258 command = "org.item.toggle"
259 mode = "normal"
260 [[bind]]
261 keys = "SPC m l l"
262 command = "org.link.insert"
263 mode = "normal"
264 [[bind]]
265 keys = "SPC m l s"
266 command = "org.link.store"
267 mode = "normal"
268 [[bind]]
269 keys = "SPC m l i"
270 command = "org.id.store-link"
271 mode = "normal"
272 [[bind]]
273 keys = "SPC n l"
274 command = "org.link.store"
275 mode = "normal"
276 [[bind]]
277 keys = "SPC m t"
278 command = "org.todo.cycle"
279 mode = "normal"
280 [[bind]]
281 keys = "SPC m q"
282 command = "org.tags.set"
283 mode = "normal"
284 [[bind]]
285 keys = "SPC m x"
286 command = "org.checkbox.toggle"
287 mode = "normal"
288 [[bind]]
289 keys = "SPC m A"
290 command = "app.archive"
291 mode = "normal"
292 [[bind]]
293 keys = "SPC m e h h"
294 command = "app.export.html"
295 mode = "normal"
296 [[bind]]
297 keys = "SPC m e h o"
298 command = "app.export.html-open"
299 mode = "normal"
300 [[bind]]
301 keys = "SPC m e m m"
302 command = "app.export.markdown"
303 mode = "normal"
304 [[bind]]
305 keys = "SPC m e l p"
306 command = "app.export.pdf"
307 mode = "normal"
308 [[bind]]
309 keys = "SPC m d d"
310 command = "org.deadline"
311 mode = "normal"
312 [[bind]]
313 keys = "SPC m d s"
314 command = "org.schedule"
315 mode = "normal"
316 [[bind]]
317 keys = "SPC m d t"
318 command = "org.timestamp.active"
319 mode = "normal"
320 [[bind]]
321 keys = "SPC m d T"
322 command = "org.timestamp.inactive"
323 mode = "normal"
324 [[bind]]
325 keys = "SPC m r r"
326 command = "app.refile"
327 mode = "normal"
328 [[bind]]
329 keys = "SPC m s r"
330 command = "app.refile"
331 mode = "normal"
332 [[bind]]
333 keys = "SPC m s A"
334 command = "app.archive"
335 mode = "normal"
336 [[bind]]
337 keys = "SPC m s a"
338 command = "org.archive.toggle-tag"
339 mode = "normal"
340 [[bind]]
341 keys = "SPC m s h"
342 command = "org.subtree.promote"
343 mode = "normal"
344 [[bind]]
345 keys = "SPC m s l"
346 command = "org.subtree.demote"
347 mode = "normal"
348 [[bind]]
349 keys = "SPC m s j"
350 command = "org.subtree.down"
351 mode = "normal"
352 [[bind]]
353 keys = "SPC m s k"
354 command = "org.subtree.up"
355 mode = "normal"
356 [[bind]]
357 keys = "SPC m c i"
358 command = "app.clock.in"
359 mode = "normal"
360 [[bind]]
361 keys = "SPC m c o"
362 command = "app.clock.out"
363 mode = "normal"
364 [[bind]]
365 keys = "SPC m c c"
366 command = "app.clock.cancel"
367 mode = "normal"
368 [[bind]]
369 keys = "SPC m c g"
370 command = "app.clock.goto"
371 mode = "normal"
372 [[bind]]
373 keys = "SPC m c G"
374 command = "app.clock.goto-recent"
375 mode = "normal"
376 [[bind]]
377 keys = "SPC m c I"
378 command = "app.clock.in-last"
379 mode = "normal"
380 [[bind]]
381 keys = "SPC m c d"
382 command = "app.clock.default"
383 mode = "normal"
384 [[bind]]
385 keys = "SPC m c r"
386 command = "app.clock.resolve"
387 mode = "normal"
388 [[bind]]
389 keys = "SPC m c R"
390 command = "app.clock.report"
391 mode = "normal"
392 [[bind]]
393 keys = "SPC m c E"
394 command = "org.effort.set"
395 mode = "normal"
396 [[bind]]
397 keys = "SPC m p p"
398 command = "org.priority.set"
399 mode = "normal"
400 [[bind]]
401 keys = "SPC m o"
402 command = "org.property.read-and-set"
403 mode = "normal"
404 [[bind]]
405 keys = "SPC m p u"
406 command = "org.priority.up"
407 mode = "normal"
408 [[bind]]
409 keys = "SPC m p d"
410 command = "org.priority.down"
411 mode = "normal"
412 [[bind]]
413 keys = "SPC m b -"
414 command = "org.table.insert-hline"
415 mode = "normal"
416 [[bind]]
417 keys = "SPC m b a"
418 command = "org.table.align"
419 mode = "normal"
420 [[bind]]
421 keys = "SPC m b r"
422 command = "org.table.recalc-all"
423 mode = "normal"
424 [[bind]]
425 keys = "SPC m b d c"
426 command = "org.table.delete-column"
427 mode = "normal"
428 [[bind]]
429 keys = "SPC m b d r"
430 command = "org.table.kill-row"
431 mode = "normal"
432 [[bind]]
433 keys = "SPC m b i c"
434 command = "org.table.insert-column"
435 mode = "normal"
436 [[bind]]
437 keys = "SPC m b i r"
438 command = "org.table.insert-row"
439 mode = "normal"
440 [[bind]]
441 keys = "SPC m b i h"
442 command = "org.table.insert-hline"
443 mode = "normal"
444
445 # evil-org and Doom's org keys
446 [[bind]]
447 keys = "TAB"
448 command = "org.cycle"
449 mode = "normal"
450 [[bind]]
451 keys = "S-TAB"
452 command = "org.cycle-global"
453 mode = "normal"
454 [[bind]]
455 keys = "RET"
456 command = "org.dwim"
457 mode = "normal"
458 [[bind]]
459 keys = "z a"
460 command = "org.fold.toggle"
461 mode = "normal"
462 [[bind]]
463 keys = "z c"
464 command = "org.fold.close"
465 mode = "normal"
466 [[bind]]
467 keys = "z o"
468 command = "org.fold.open"
469 mode = "normal"
470 [[bind]]
471 keys = "z A"
472 command = "org.cycle-global"
473 mode = "normal"
474 [[bind]]
475 keys = "g h"
476 command = "org.heading.up"
477 mode = "normal"
478 [[bind]]
479 keys = "] h"
480 command = "org.heading.forward-same-level"
481 mode = "normal"
482 [[bind]]
483 keys = "[ h"
484 command = "org.heading.backward-same-level"
485 mode = "normal"
486 [[bind]]
487 keys = "RET"
488 command = "org.table.next-row"
489 when = "table"
490 mode = "insert"
491 [[bind]]
492 keys = "TAB"
493 command = "org.cycle"
494 mode = "visual"
495 [[bind]]
496 keys = "S-TAB"
497 command = "org.cycle-global"
498 mode = "visual"
499
500 # Doom's corfu: completion-at-point in insert state.
501 [[bind]]
502 keys = "C-SPC"
503 command = "editor.complete"
504 mode = "insert"
505 [[bind]]
506 keys = "C-@"
507 command = "editor.complete"
508 mode = "insert"
509
510 # Insert state: org-cycle and org-shifttab with Doom's +org-indent-maybe-h, which
511 # demotes or promotes a heading and indents or outdents an item tree.
512 [[bind]]
513 keys = "S-TAB"
514 command = "org.cycle-global"
515 mode = "insert"
516 [[bind]]
517 keys = "TAB"
518 command = "org.table.next-field"
519 when = "table"
520 mode = "insert"
521 [[bind]]
522 keys = "S-TAB"
523 command = "org.table.previous-field"
524 when = "table"
525 mode = "insert"
526 [[bind]]
527 keys = "TAB"
528 command = "org.item.indent-tree"
529 when = "item"
530 mode = "insert"
531 [[bind]]
532 keys = "S-TAB"
533 command = "org.item.outdent-tree"
534 when = "item"
535 mode = "insert"
536 [[bind]]
537 keys = "TAB"
538 command = "org.heading.demote"
539 when = "heading"
540 mode = "insert"
541 [[bind]]
542 keys = "S-TAB"
543 command = "org.heading.promote"
544 when = "heading"
545 mode = "insert"
546
547 """
548
549
55053 static let common = """
55154 [[bind]]
55255 keys = "TAB"
@@ -575,783 +78,4 @@ public enum KeymapPreset: String, Sendable, CaseIterable {
57578
57679 """
57780
578 static let emacsBindings = """
579 # Movement and editing. With a mark set (C-SPC), movement extends the region.
580 [[bind]]
581 keys = "C-f"
582 command = "edit.forward-char"
583 [[bind]]
584 keys = "C-b"
585 command = "edit.backward-char"
586 [[bind]]
587 keys = "C-n"
588 command = "edit.next-line"
589 [[bind]]
590 keys = "C-p"
591 command = "edit.previous-line"
592 [[bind]]
593 keys = "C-a"
594 command = "edit.beginning-of-line"
595 [[bind]]
596 keys = "C-e"
597 command = "edit.end-of-line"
598 [[bind]]
599 keys = "M-f"
600 command = "edit.forward-word"
601 [[bind]]
602 keys = "M-b"
603 command = "edit.backward-word"
604 [[bind]]
605 keys = "M-<"
606 command = "edit.beginning-of-buffer"
607 [[bind]]
608 keys = "M->"
609 command = "edit.end-of-buffer"
610 [[bind]]
611 keys = "C-v"
612 command = "edit.scroll-up"
613 [[bind]]
614 keys = "M-v"
615 command = "edit.scroll-down"
616 [[bind]]
617 keys = "C-l"
618 command = "edit.recenter"
619 [[bind]]
620 keys = "C-d"
621 command = "edit.delete-char"
622 [[bind]]
623 keys = "M-d"
624 command = "edit.kill-word"
625 [[bind]]
626 keys = "M-DEL"
627 command = "edit.backward-kill-word"
628 [[bind]]
629 keys = "C-k"
630 command = "edit.kill-line"
631 [[bind]]
632 keys = "C-y"
633 command = "edit.yank"
634 [[bind]]
635 keys = "C-SPC"
636 command = "edit.set-mark"
637 [[bind]]
638 keys = "C-M-i"
639 command = "editor.complete"
640 [[bind]]
641 keys = "C-x h"
642 command = "edit.select-all"
643 [[bind]]
644 keys = "C-w"
645 command = "edit.kill-region"
646 [[bind]]
647 keys = "M-w"
648 command = "edit.copy-region"
649 [[bind]]
650 keys = "C-/"
651 command = "edit.undo"
652 [[bind]]
653 keys = "C-_"
654 command = "edit.undo"
655 [[bind]]
656 keys = "C-x u"
657 command = "edit.undo"
658 [[bind]]
659 keys = "C-g"
660 command = "edit.keyboard-quit"
661 [[bind]]
662 keys = "C-t"
663 command = "edit.transpose-chars"
664 [[bind]]
665 keys = "C-s"
666 command = "edit.find"
667 [[bind]]
668 keys = "C-r"
669 command = "edit.find"
670 [[bind]]
671 keys = "M-%"
672 command = "edit.replace"
673
674 # Files and commands
675 [[bind]]
676 keys = "C-x C-s"
677 command = "app.save"
678 [[bind]]
679 keys = "C-c C-o"
680 command = "org.link.open"
681 [[bind]]
682 keys = "C-c C-l"
683 command = "org.link.insert"
684 [[bind]]
685 keys = "C-c l"
686 command = "org.link.store"
687 [[bind]]
688 keys = "C-c ;"
689 command = "org.heading.toggle-comment"
690 [[bind]]
691 keys = "C-c *"
692 command = "org.heading.toggle"
693 [[bind]]
694 keys = "C-c -"
695 command = "org.item.toggle"
696 [[bind]]
697 keys = "C-c @"
698 command = "org.subtree.mark"
699 [[bind]]
700 keys = "C-c C-x C-w"
701 command = "org.subtree.cut"
702 [[bind]]
703 keys = "C-c C-x M-w"
704 command = "org.subtree.copy"
705 [[bind]]
706 keys = "C-c C-x C-y"
707 command = "org.subtree.paste"
708 [[bind]]
709 keys = "C-c C-x c"
710 command = "org.subtree.clone"
711 [[bind]]
712 keys = "C-c ^"
713 command = "org.sort"
714 [[bind]]
715 keys = "C-c C-c"
716 command = "org.ctrl-c-ctrl-c"
717 [[bind]]
718 keys = "C-c C-y"
719 command = "org.timestamp.evaluate-range"
720 [[bind]]
721 keys = "C-c C-x f"
722 command = "org.footnote.action"
723 [[bind]]
724 keys = "C-c ="
725 command = "org.table.column-formula"
726 [[bind]]
727 keys = "C-c TAB"
728 command = "org.table.toggle-column-width"
729 when = "table"
730 [[bind]]
731 keys = "C-x n s"
732 command = "org.narrow.subtree"
733 [[bind]]
734 keys = "C-x n b"
735 command = "org.narrow.block"
736 [[bind]]
737 keys = "C-x n w"
738 command = "org.widen"
739 [[bind]]
740 keys = "C-x x t"
741 command = "editor.toggle-truncate-lines"
742 [[bind]]
743 keys = "C-c C-j"
744 command = "org.goto"
745 [[bind]]
746 keys = "C-c /"
747 command = "org.sparse-tree"
748 [[bind]]
749 keys = "C-c ,"
750 command = "org.priority.set"
751 [[bind]]
752 keys = "C-c C-x p"
753 command = "org.property.read-and-set"
754 [[bind]]
755 keys = "C-c C-x i"
756 command = "org.columns.insert-dblock"
757 [[bind]]
758 keys = "C-c C-x a"
759 command = "org.archive.toggle-tag"
760 [[bind]]
761 keys = "C-c C-x A"
762 command = "org.archive.to-sibling"
763 [[bind]]
764 keys = "C-c C-x o"
765 command = "org.property.toggle-ordered"
766 [[bind]]
767 keys = "C-c C-x C-v"
768 command = "org.toggle-inline-images"
769 [[bind]]
770 keys = "C-c C-x C-c"
771 command = "org.columns"
772 [[bind]]
773 keys = "S-<right>"
774 command = "org.property.next-value"
775 when = "property"
776 [[bind]]
777 keys = "S-<left>"
778 command = "org.property.previous-value"
779 when = "property"
780 [[bind]]
781 keys = "C-c C-x C-r"
782 command = "org.clock.report"
783 [[bind]]
784 keys = "C-c C-x C-u"
785 command = "org.dblock.update"
786 [[bind]]
787 keys = "C-c C-x e"
788 command = "org.effort.set"
789 [[bind]]
790 keys = "C-c C-c"
791 command = "org.dblock.update"
792 when = "dblock"
793 [[bind]]
794 keys = "C-c C-,"
795 command = "org.structure-template"
796 [[bind]]
797 keys = "C-c '"
798 command = "org.edit-special"
799 [[bind]]
800 keys = "C-c C-v t"
801 command = "org.babel.tangle"
802 [[bind]]
803 keys = "C-c C-v C-t"
804 command = "org.babel.tangle"
805 [[bind]]
806 keys = "C-c `"
807 command = "org.table.edit-field"
808 when = "table"
809 [[bind]]
810 keys = "C-x b"
811 command = "app.buffer.switch"
812 [[bind]]
813 keys = "C-x C-b"
814 command = "app.buffer.switch"
815 [[bind]]
816 keys = "C-x k"
817 command = "app.buffer.kill"
818 [[bind]]
819 keys = "C-x <right>"
820 command = "app.buffer.next"
821 [[bind]]
822 keys = "C-x <left>"
823 command = "app.buffer.previous"
824 [[bind]]
825 keys = "C-x s"
826 command = "app.save-all"
827 [[bind]]
828 keys = "C-x C-f"
829 command = "app.quick-open"
830 [[bind]]
831 keys = "M-x"
832 command = "app.palette"
833 [[bind]]
834 keys = "C-c a"
835 command = "app.agenda"
836 [[bind]]
837 keys = "C-c c"
838 command = "app.capture"
839 [[bind]]
840 keys = "C-c C-x C-i"
841 command = "app.clock.in"
842 [[bind]]
843 keys = "C-c C-x C-o"
844 command = "app.clock.out"
845 [[bind]]
846 keys = "C-c C-x C-q"
847 command = "app.clock.cancel"
848 [[bind]]
849 keys = "C-c C-x C-j"
850 command = "app.clock.goto"
851 [[bind]]
852 keys = "C-c C-x C-x"
853 command = "app.clock.in-last"
854 [[bind]]
855 keys = "C-c C-x C-z"
856 command = "app.clock.resolve"
857 [[bind]]
858 keys = "C-c C-e h h"
859 command = "app.export.html"
860 [[bind]]
861 keys = "C-c C-e h o"
862 command = "app.export.html-open"
863 [[bind]]
864 keys = "C-c C-e m m"
865 command = "app.export.markdown"
866 [[bind]]
867 keys = "C-c C-e l p"
868 command = "app.export.pdf"
869 [[bind]]
870 keys = "C-c C-e l l"
871 command = "app.export.latex"
872 [[bind]]
873 keys = "C-c C-e o o"
874 command = "app.export.odt"
875 [[bind]]
876 keys = "C-c C-e t u"
877 command = "app.export.text"
878
879 # Org
880 [[bind]]
881 keys = "C-c C-t"
882 command = "org.todo.cycle"
883 [[bind]]
884 keys = "S-<right>"
885 command = "org.todo.next"
886 when = "heading"
887 [[bind]]
888 keys = "S-<left>"
889 command = "org.todo.previous"
890 when = "heading"
891 [[bind]]
892 keys = "S-<up>"
893 command = "org.priority.up"
894 when = "heading"
895 [[bind]]
896 keys = "S-<down>"
897 command = "org.priority.down"
898 when = "heading"
899 [[bind]]
900 keys = "M-<left>"
901 command = "org.heading.promote"
902 when = "heading"
903 [[bind]]
904 keys = "M-<right>"
905 command = "org.heading.demote"
906 when = "heading"
907 [[bind]]
908 keys = "M-S-<left>"
909 command = "org.subtree.promote"
910 when = "heading"
911 [[bind]]
912 keys = "M-S-<right>"
913 command = "org.subtree.demote"
914 when = "heading"
915 [[bind]]
916 keys = "M-<up>"
917 command = "org.subtree.up"
918 when = "heading"
919 [[bind]]
920 keys = "M-<down>"
921 command = "org.subtree.down"
922 when = "heading"
923 [[bind]]
924 keys = "M-RET"
925 command = "org.heading.insert"
926 [[bind]]
927 keys = "C-RET"
928 command = "org.heading.insert-after-subtree"
929 [[bind]]
930 keys = "M-S-RET"
931 command = "org.heading.insert-todo"
932 [[bind]]
933 keys = "C-c C-n"
934 command = "org.heading.next"
935 [[bind]]
936 keys = "C-c C-p"
937 command = "org.heading.previous"
938 [[bind]]
939 keys = "C-c C-f"
940 command = "org.heading.forward-same-level"
941 [[bind]]
942 keys = "C-c C-b"
943 command = "org.heading.backward-same-level"
944 [[bind]]
945 keys = "C-c C-u"
946 command = "org.heading.up"
947 [[bind]]
948 keys = "C-c C-q"
949 command = "org.tags.set"
950 [[bind]]
951 keys = "M-RET"
952 command = "org.item.insert"
953 when = "item"
954 [[bind]]
955 keys = "M-S-RET"
956 command = "org.item.insert-checkbox"
957 when = "item"
958 [[bind]]
959 keys = "M-<left>"
960 command = "org.item.outdent"
961 when = "item"
962 [[bind]]
963 keys = "M-<right>"
964 command = "org.item.indent"
965 when = "item"
966 [[bind]]
967 keys = "M-S-<left>"
968 command = "org.item.outdent-tree"
969 when = "item"
970 [[bind]]
971 keys = "M-S-<right>"
972 command = "org.item.indent-tree"
973 when = "item"
974 [[bind]]
975 keys = "M-<up>"
976 command = "org.item.up"
977 when = "item"
978 [[bind]]
979 keys = "M-<down>"
980 command = "org.item.down"
981 when = "item"
982 [[bind]]
983 keys = "C-c C-c"
984 command = "org.ctrl-c-ctrl-c"
985 when = "item"
986 [[bind]]
987 keys = "C-c C-x C-b"
988 command = "org.checkbox.toggle"
989 [[bind]]
990 keys = "C-c C-w"
991 command = "app.refile"
992 [[bind]]
993 keys = "C-c C-x C-s"
994 command = "app.archive"
995 [[bind]]
996 keys = "C-c $"
997 command = "app.archive"
998 [[bind]]
999 keys = "C-c ."
1000 command = "org.timestamp.active"
1001 [[bind]]
1002 keys = "C-c !"
1003 command = "org.timestamp.inactive"
1004 [[bind]]
1005 keys = "C-c C-s"
1006 command = "org.schedule"
1007 [[bind]]
1008 keys = "C-c C-d"
1009 command = "org.deadline"
1010 [[bind]]
1011 keys = "M-q"
1012 command = "org.fill-paragraph"
1013 [[bind]]
1014 keys = "C-c C-c"
1015 command = "org.ctrl-c-ctrl-c"
1016 when = "table"
1017 [[bind]]
1018 keys = "C-c C-c"
1019 command = "org.table.recalc-all"
1020 when = "tblfm"
1021 [[bind]]
1022 keys = "C-c *"
1023 command = "org.table.recalc"
1024 when = "table"
1025 [[bind]]
1026 keys = "C-c C-c"
1027 command = "org.babel.execute"
1028 when = "src"
1029 [[bind]]
1030 keys = "M-<up>"
1031 command = "org.table.row-up"
1032 when = "table"
1033 [[bind]]
1034 keys = "M-<down>"
1035 command = "org.table.row-down"
1036 when = "table"
1037 [[bind]]
1038 keys = "M-<left>"
1039 command = "org.table.column-left"
1040 when = "table"
1041 [[bind]]
1042 keys = "M-<right>"
1043 command = "org.table.column-right"
1044 when = "table"
1045 [[bind]]
1046 keys = "M-S-<right>"
1047 command = "org.table.insert-column"
1048 when = "table"
1049 [[bind]]
1050 keys = "M-S-<left>"
1051 command = "org.table.delete-column"
1052 when = "table"
1053 [[bind]]
1054 keys = "M-S-<up>"
1055 command = "org.table.kill-row"
1056 when = "table"
1057 [[bind]]
1058 keys = "M-S-<down>"
1059 command = "org.table.insert-row"
1060 when = "table"
1061 [[bind]]
1062 keys = "C-c -"
1063 command = "org.table.insert-hline"
1064 when = "table"
1065 [[bind]]
1066 keys = "C-c |"
1067 command = "org.table.create"
1068 [[bind]]
1069 keys = "S-<up>"
1070 command = "org.timestamp.up"
1071 when = "timestamp"
1072 [[bind]]
1073 keys = "S-<down>"
1074 command = "org.timestamp.down"
1075 when = "timestamp"
1076 [[bind]]
1077 keys = "S-<right>"
1078 command = "org.timestamp.day-later"
1079 when = "timestamp"
1080 [[bind]]
1081 keys = "S-<left>"
1082 command = "org.timestamp.day-earlier"
1083 when = "timestamp"
1084
1085 """
1086
1087 /// Standard Mac text keys stay as they are; org commands use Control-Command chords, which
1088 /// macOS text editing leaves free.
1089 static let macBindings = """
1090 [[bind]]
1091 keys = "C-TAB"
1092 command = "app.buffer.next"
1093 [[bind]]
1094 keys = "C-S-TAB"
1095 command = "app.buffer.previous"
1096 [[bind]]
1097 keys = "C-s-t"
1098 command = "org.todo.cycle"
1099 [[bind]]
1100 keys = "C-s-<up>"
1101 command = "org.priority.up"
1102 [[bind]]
1103 keys = "C-s-<down>"
1104 command = "org.priority.down"
1105 [[bind]]
1106 keys = "C-s-<left>"
1107 command = "org.heading.promote"
1108 [[bind]]
1109 keys = "C-s-<right>"
1110 command = "org.heading.demote"
1111 [[bind]]
1112 keys = "C-M-s-<left>"
1113 command = "org.subtree.promote"
1114 [[bind]]
1115 keys = "C-M-s-<right>"
1116 command = "org.subtree.demote"
1117 [[bind]]
1118 keys = "C-M-s-<up>"
1119 command = "org.subtree.up"
1120 [[bind]]
1121 keys = "C-M-s-<down>"
1122 command = "org.subtree.down"
1123 [[bind]]
1124 keys = "s-RET"
1125 command = "org.heading.insert"
1126 [[bind]]
1127 keys = "C-s-RET"
1128 command = "org.heading.insert-after-subtree"
1129 [[bind]]
1130 keys = "s-S-RET"
1131 command = "org.heading.insert-todo"
1132 [[bind]]
1133 keys = "M-s-<down>"
1134 command = "org.heading.next"
1135 [[bind]]
1136 keys = "M-s-<up>"
1137 command = "org.heading.previous"
1138 [[bind]]
1139 keys = "C-s-g"
1140 command = "org.tags.set"
1141 [[bind]]
1142 keys = "s-RET"
1143 command = "org.item.insert"
1144 when = "item"
1145 [[bind]]
1146 keys = "s-S-RET"
1147 command = "org.item.insert-checkbox"
1148 when = "item"
1149 [[bind]]
1150 keys = "C-s-<left>"
1151 command = "org.item.outdent"
1152 when = "item"
1153 [[bind]]
1154 keys = "C-s-<right>"
1155 command = "org.item.indent"
1156 when = "item"
1157 [[bind]]
1158 keys = "C-M-s-<left>"
1159 command = "org.item.outdent-tree"
1160 when = "item"
1161 [[bind]]
1162 keys = "C-M-s-<right>"
1163 command = "org.item.indent-tree"
1164 when = "item"
1165 [[bind]]
1166 keys = "C-M-s-<up>"
1167 command = "org.item.up"
1168 when = "item"
1169 [[bind]]
1170 keys = "C-M-s-<down>"
1171 command = "org.item.down"
1172 when = "item"
1173 [[bind]]
1174 keys = "C-s-c"
1175 command = "org.checkbox.toggle"
1176 [[bind]]
1177 keys = "C-s-w"
1178 command = "app.refile"
1179 [[bind]]
1180 keys = "C-s-a"
1181 command = "app.archive"
1182 [[bind]]
1183 keys = "C-s-."
1184 command = "org.timestamp.active"
1185 [[bind]]
1186 keys = "C-M-s-."
1187 command = "org.timestamp.inactive"
1188 [[bind]]
1189 keys = "C-s-s"
1190 command = "org.schedule"
1191 [[bind]]
1192 keys = "C-s-e"
1193 command = "org.deadline"
1194 [[bind]]
1195 keys = "C-s-p"
1196 command = "org.fill-paragraph"
1197 [[bind]]
1198 keys = "C-s-<up>"
1199 command = "org.table.row-up"
1200 when = "table"
1201 [[bind]]
1202 keys = "C-s-<down>"
1203 command = "org.table.row-down"
1204 when = "table"
1205 [[bind]]
1206 keys = "C-s-<left>"
1207 command = "org.table.column-left"
1208 when = "table"
1209 [[bind]]
1210 keys = "C-s-<right>"
1211 command = "org.table.column-right"
1212 when = "table"
1213 [[bind]]
1214 keys = "C-M-s-<right>"
1215 command = "org.table.insert-column"
1216 when = "table"
1217 [[bind]]
1218 keys = "C-M-s-<left>"
1219 command = "org.table.delete-column"
1220 when = "table"
1221 [[bind]]
1222 keys = "C-M-s-<up>"
1223 command = "org.table.kill-row"
1224 when = "table"
1225 [[bind]]
1226 keys = "C-M-s-<down>"
1227 command = "org.table.insert-row"
1228 when = "table"
1229 [[bind]]
1230 keys = "C-s--"
1231 command = "org.table.insert-hline"
1232 when = "table"
1233 [[bind]]
1234 keys = "C-s-*"
1235 command = "org.table.recalc"
1236 when = "table"
1237 [[bind]]
1238 keys = "C-s-\\\\"
1239 command = "org.table.create"
1240 [[bind]]
1241 keys = "C-s-<up>"
1242 command = "org.timestamp.up"
1243 when = "timestamp"
1244 [[bind]]
1245 keys = "C-s-<down>"
1246 command = "org.timestamp.down"
1247 when = "timestamp"
1248 [[bind]]
1249 keys = "C-s-<right>"
1250 command = "org.timestamp.day-later"
1251 when = "timestamp"
1252 [[bind]]
1253 keys = "C-s-<left>"
1254 command = "org.timestamp.day-earlier"
1255 when = "timestamp"
1256
1257 # Act at point, links, clocking, export and the rest of C-c.
1258 [[bind]]
1259 keys = "C-s-x"
1260 command = "org.ctrl-c-ctrl-c"
1261 [[bind]]
1262 keys = "C-s-x"
1263 command = "org.dblock.update"
1264 when = "dblock"
1265 [[bind]]
1266 keys = "C-s-x"
1267 command = "org.table.recalc-all"
1268 when = "tblfm"
1269 [[bind]]
1270 keys = "C-s-x"
1271 command = "org.babel.execute"
1272 when = "src"
1273 [[bind]]
1274 keys = "s-k"
1275 command = "org.link.insert"
1276 [[bind]]
1277 keys = "C-s-o"
1278 command = "org.link.open"
1279 [[bind]]
1280 keys = "C-s-l"
1281 command = "org.link.store"
1282 [[bind]]
1283 keys = "C-s-i"
1284 command = "app.clock.in"
1285 [[bind]]
1286 keys = "C-S-s-i"
1287 command = "app.clock.out"
1288 [[bind]]
1289 keys = "C-s-j"
1290 command = "app.clock.goto"
1291 [[bind]]
1292 keys = "C-M-s-i"
1293 command = "app.clock.in-recent"
1294 [[bind]]
1295 keys = "C-M-s-j"
1296 command = "app.clock.goto-recent"
1297 [[bind]]
1298 keys = "C-s-k"
1299 command = "app.clock.cancel"
1300 [[bind]]
1301 keys = "s-S-e"
1302 command = "app.export-dialog"
1303 [[bind]]
1304 keys = "C-s-n"
1305 command = "org.narrow.toggle"
1306 [[bind]]
1307 keys = "C-S-s-s"
1308 command = "org.sort"
1309 [[bind]]
1310 keys = "C-S-s-p"
1311 command = "org.property.read-and-set"
1312 [[bind]]
1313 keys = "C-S-s-f"
1314 command = "org.footnote.action"
1315 [[bind]]
1316 keys = "C-s-'"
1317 command = "org.edit-special"
1318 [[bind]]
1319 keys = "C-S-s-<right>"
1320 command = "org.todo.next"
1321 when = "heading"
1322 [[bind]]
1323 keys = "C-S-s-<left>"
1324 command = "org.todo.previous"
1325 when = "heading"
1326 [[bind]]
1327 keys = "C-S-s-<right>"
1328 command = "org.property.next-value"
1329 when = "property"
1330 [[bind]]
1331 keys = "C-S-s-<left>"
1332 command = "org.property.previous-value"
1333 when = "property"
1334 [[bind]]
1335 keys = "M-S-s-<down>"
1336 command = "org.heading.forward-same-level"
1337 [[bind]]
1338 keys = "M-S-s-<up>"
1339 command = "org.heading.backward-same-level"
1340 [[bind]]
1341 keys = "C-S-s-e"
1342 command = "org.effort.set"
1343 [[bind]]
1344 keys = "C-s-,"
1345 command = "org.priority.set"
1346 [[bind]]
1347 keys = "C-s-v"
1348 command = "org.babel.tangle"
1349 [[bind]]
1350 keys = "C-S-s-v"
1351 command = "org.babel.tangle-block"
1352 [[bind]]
1353 keys = "C-M-s-v"
1354 command = "org.babel.tangle-target"
1355
1356 """
135781}