Krolyxon
Commit dd0e6bc

Branches

Refs →

aurora.configyazikeymap.toml

380 lines · 20.3 KB · TOML

1# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config.
2# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas.
3"$schema" = "https://yazi-rs.github.io/schemas/keymap.json"
4
5
6
7[mgr]
8keymap = [
9 { on = "l", run = "plugin smart-enter", desc = "Smart enter on l" },
10 { on = "<Esc>", run = "escape", desc = "Exit visual mode, clear selection, or cancel search" },
11 { on = "<C-[>", run = "escape", desc = "Exit visual mode, clear selection, or cancel search" },
12 { on = "Q", run = "quit", desc = "Quit the process" },
13 { on = "q", run = "quit --no-cwd-file", desc = "Quit without outputting cwd-file" },
14 { on = "<C-c>", run = "close", desc = "Close the current tab, or quit if it's last" },
15 { on = "<C-z>", run = "suspend", desc = "Suspend the process" },
16
17 # Hopping
18 { on = "k", run = "arrow prev", desc = "Previous file" },
19 { on = "j", run = "arrow next", desc = "Next file" },
20
21 { on = "<Up>", run = "arrow prev", desc = "Previous file" },
22 { on = "<Down>", run = "arrow next", desc = "Next file" },
23
24 { on = "<C-u>", run = "arrow -50%", desc = "Move cursor up half page" },
25 { on = "<C-d>", run = "arrow 50%", desc = "Move cursor down half page" },
26 { on = "<C-b>", run = "arrow -100%", desc = "Move cursor up one page" },
27 { on = "<C-f>", run = "arrow 100%", desc = "Move cursor down one page" },
28
29 { on = "<S-PageUp>", run = "arrow -50%", desc = "Move cursor up half page" },
30 { on = "<S-PageDown>", run = "arrow 50%", desc = "Move cursor down half page" },
31 { on = "<PageUp>", run = "arrow -100%", desc = "Move cursor up one page" },
32 { on = "<PageDown>", run = "arrow 100%", desc = "Move cursor down one page" },
33
34 { on = [ "g", "g" ], run = "arrow top", desc = "Go to top" },
35 { on = "G", run = "arrow bot", desc = "Go to bottom" },
36
37 # Navigation
38 { on = "h", run = "leave", desc = "Back to the parent directory" },
39 { on = "l", run = "enter", desc = "Enter the child directory" },
40
41 { on = "<Left>", run = "leave", desc = "Back to the parent directory" },
42 { on = "<Right>", run = "enter", desc = "Enter the child directory" },
43
44 { on = "H", run = "back", desc = "Back to previous directory" },
45 { on = "L", run = "forward", desc = "Forward to next directory" },
46
47 # Toggle
48 { on = "<Space>", run = [ "toggle", "arrow next" ], desc = "Toggle the current selection state" },
49 { on = "<C-a>", run = "toggle_all --state=on", desc = "Select all files" },
50 { on = "<C-r>", run = "toggle_all", desc = "Invert selection of all files" },
51
52 # Visual mode
53 { on = "v", run = "visual_mode", desc = "Enter visual mode (selection mode)" },
54 { on = "V", run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" },
55
56 # Seeking
57 { on = "K", run = "seek -5", desc = "Seek up 5 units in the preview" },
58 { on = "J", run = "seek 5", desc = "Seek down 5 units in the preview" },
59
60 # Spotting
61 { on = "<Tab>", run = "spot", desc = "Spot hovered file" },
62
63 # Operation
64 { on = "e", run = "shell '$EDITOR \"$@\"' --block --confirm", desc = "Open selected file in $EDITOR" },
65 { on = "o", run = "open", desc = "Open selected files" },
66 { on = "O", run = "open --interactive", desc = "Open selected files interactively" },
67 { on = "<Enter>", run = "open", desc = "Open selected files" },
68 { on = "<S-Enter>", run = "open --interactive", desc = "Open selected files interactively" },
69 { on = "y", run = "yank", desc = "Yank selected files (copy)" },
70 { on = "d", run = "yank --cut", desc = "Yank selected files (cut)" },
71 { on = "p", run = "paste", desc = "Paste yanked files" },
72 { on = "P", run = "paste --force", desc = "Paste yanked files (overwrite if the destination exists)" },
73 { on = "-", run = "link", desc = "Symlink the absolute path of yanked files" },
74 { on = "_", run = "link --relative", desc = "Symlink the relative path of yanked files" },
75 { on = "<C-->", run = "hardlink", desc = "Hardlink yanked files" },
76 { on = "Y", run = "unyank", desc = "Cancel the yank status" },
77 { on = "X", run = "unyank", desc = "Cancel the yank status" },
78 { on = "D", run = "remove --permanently", desc = "Permanently delete selected files" },
79 { on = "a", run = "create", desc = "Create a file (ends with / for directories)" },
80 { on = "i", run = "rename --cursor=before_ext", desc = "Rename selected file(s)" },
81 { on = "A", run = "rename --cursor=after_ext", desc = "Rename selected file(s) (After extension)" },
82 { on = ";", run = "shell --interactive", desc = "Run a shell command" },
83 { on = ":", run = "shell --block --interactive", desc = "Run a shell command (block until finishes)" },
84 { on = ".", run = "hidden toggle", desc = "Toggle the visibility of hidden files" },
85 { on = "s", run = "search --via=fd", desc = "Search files by name via fd" },
86 { on = "S", run = "search --via=rg", desc = "Search files by content via ripgrep" },
87 { on = "<C-s>", run = "escape --search", desc = "Cancel the ongoing search" },
88 { on = "z", run = "plugin fzf", desc = "Jump to a file/directory via fzf" },
89
90 # Linemode
91 { on = [ "m", "s" ], run = "linemode size", desc = "Linemode: size" },
92 { on = [ "m", "p" ], run = "linemode permissions", desc = "Linemode: permissions" },
93 { on = [ "m", "b" ], run = "linemode btime", desc = "Linemode: btime" },
94 { on = [ "m", "m" ], run = "linemode mtime", desc = "Linemode: mtime" },
95 { on = [ "m", "o" ], run = "linemode owner", desc = "Linemode: owner" },
96 { on = [ "m", "n" ], run = "linemode none", desc = "Linemode: none" },
97
98 # Copy
99 { on = [ "c", "c" ], run = "copy path", desc = "Copy the file path" },
100 { on = [ "c", "d" ], run = "copy dirname", desc = "Copy the directory path" },
101 { on = [ "c", "f" ], run = "copy filename", desc = "Copy the filename" },
102 { on = [ "c", "n" ], run = "copy name_without_ext", desc = "Copy the filename without extension" },
103
104 # Filter
105 { on = "f", run = "filter --smart", desc = "Filter files" },
106
107 # Find
108 { on = "/", run = "find --smart", desc = "Find next file" },
109 { on = "?", run = "find --previous --smart", desc = "Find previous file" },
110 { on = "n", run = "find_arrow", desc = "Next found" },
111 { on = "N", run = "find_arrow --previous", desc = "Previous found" },
112
113 # Sorting
114 { on = [ ",", "m" ], run = [ "sort mtime --reverse=no", "linemode mtime" ], desc = "Sort by modified time" },
115 { on = [ ",", "M" ], run = [ "sort mtime --reverse", "linemode mtime" ], desc = "Sort by modified time (reverse)" },
116 { on = [ ",", "b" ], run = [ "sort btime --reverse=no", "linemode btime" ], desc = "Sort by birth time" },
117 { on = [ ",", "B" ], run = [ "sort btime --reverse", "linemode btime" ], desc = "Sort by birth time (reverse)" },
118 { on = [ ",", "e" ], run = "sort extension --reverse=no", desc = "Sort by extension" },
119 { on = [ ",", "E" ], run = "sort extension --reverse", desc = "Sort by extension (reverse)" },
120 { on = [ ",", "a" ], run = "sort alphabetical --reverse=no", desc = "Sort alphabetically" },
121 { on = [ ",", "A" ], run = "sort alphabetical --reverse", desc = "Sort alphabetically (reverse)" },
122 { on = [ ",", "n" ], run = "sort natural --reverse=no", desc = "Sort naturally" },
123 { on = [ ",", "N" ], run = "sort natural --reverse", desc = "Sort naturally (reverse)" },
124 { on = [ ",", "s" ], run = [ "sort size --reverse=no", "linemode size" ], desc = "Sort by size" },
125 { on = [ ",", "S" ], run = [ "sort size --reverse", "linemode size" ], desc = "Sort by size (reverse)" },
126 { on = [ ",", "r" ], run = "sort random --reverse=no", desc = "Sort randomly" },
127
128 # Goto
129 { on = [ "g", "h" ], run = "cd ~", desc = "Go home" },
130 { on = [ "g", "c" ], run = "cd ~/.config", desc = "Go ~/.config" },
131 { on = [ "g", "d" ], run = "cd ~/dox", desc = "Go ~/dox" },
132 { on = [ "g", "D" ], run = "cd ~/dl", desc = "Go ~/dl" },
133 { on = [ "g", "p" ], run = "cd ~/pix", desc = "Go ~/pix" },
134 { on = [ "g", "C" ], run = "cd ~/.cache", desc = "Go ~/.cache" },
135 { on = [ "g", "r" ], run = "cd ~/code/repos", desc = "Go ~/code/repos" },
136 { on = [ "g", "v" ], run = "cd ~/vids", desc = "Go ~/vids" },
137 { on = [ "g", "m" ], run = "cd ~/media/movies", desc = "Go ~/media/movies" },
138 { on = [ "g", "M" ], run = "cd ~/media", desc = "Go ~/media" },
139 { on = [ "g", "b" ], run = "cd ~/.local/bin", desc = "Go ~/.local/bin" },
140 { on = [ "g", "s" ], run = "cd ~/.local/share", desc = "Go ~/.local/bin" },
141 { on = [ "g", "t" ], run = "cd /tmp", desc = "Go /tmp" },
142 { on = [ "g", "<Space>" ], run = "cd --interactive", desc = "Jump interactively" },
143 { on = [ "g", "f" ], run = "follow", desc = "Follow hovered symlink" },
144
145 # Tabs
146 { on = "t", run = "tab_create --current", desc = "Create a new tab with CWD" },
147
148 { on = "1", run = "tab_switch 0", desc = "Switch to first tab" },
149 { on = "2", run = "tab_switch 1", desc = "Switch to second tab" },
150 { on = "3", run = "tab_switch 2", desc = "Switch to third tab" },
151 { on = "4", run = "tab_switch 3", desc = "Switch to fourth tab" },
152 { on = "5", run = "tab_switch 4", desc = "Switch to fifth tab" },
153 { on = "6", run = "tab_switch 5", desc = "Switch to sixth tab" },
154 { on = "7", run = "tab_switch 6", desc = "Switch to seventh tab" },
155 { on = "8", run = "tab_switch 7", desc = "Switch to eighth tab" },
156 { on = "9", run = "tab_switch 8", desc = "Switch to ninth tab" },
157
158 { on = "[", run = "tab_switch -1 --relative", desc = "Switch to previous tab" },
159 { on = "]", run = "tab_switch 1 --relative", desc = "Switch to next tab" },
160
161 { on = "{", run = "tab_swap -1", desc = "Swap current tab with previous tab" },
162 { on = "}", run = "tab_swap 1", desc = "Swap current tab with next tab" },
163
164 # Tasks
165 { on = "w", run = "tasks:show", desc = "Show task manager" },
166
167 # Help
168 { on = "~", run = "help", desc = "Open help" },
169 { on = "<F1>", run = "help", desc = "Open help" },
170]
171
172[tasks]
173
174keymap = [
175 { on = "<Esc>", run = "close", desc = "Close task manager" },
176 { on = "<C-[>", run = "close", desc = "Close task manager" },
177 { on = "<C-c>", run = "close", desc = "Close task manager" },
178 { on = "w", run = "close", desc = "Close task manager" },
179
180 { on = "k", run = "arrow prev", desc = "Previous task" },
181 { on = "j", run = "arrow next", desc = "Next task" },
182
183 { on = "<Up>", run = "arrow prev", desc = "Previous task" },
184 { on = "<Down>", run = "arrow next", desc = "Next task" },
185
186 { on = "<Enter>", run = "inspect", desc = "Inspect the task" },
187 { on = "x", run = "cancel", desc = "Cancel the task" },
188
189 # Help
190 { on = "~", run = "help", desc = "Open help" },
191 { on = "<F1>", run = "help", desc = "Open help" },
192]
193
194[spot]
195
196keymap = [
197 { on = "<Esc>", run = "close", desc = "Close the spot" },
198 { on = "<C-[>", run = "close", desc = "Close the spot" },
199 { on = "<C-c>", run = "close", desc = "Close the spot" },
200 { on = "<Tab>", run = "close", desc = "Close the spot" },
201
202 { on = "k", run = "arrow prev", desc = "Previous line" },
203 { on = "j", run = "arrow next", desc = "Next line" },
204 { on = "h", run = "swipe prev", desc = "Swipe to previous file" },
205 { on = "l", run = "swipe next", desc = "Swipe to next file" },
206
207 { on = "<Up>", run = "arrow prev", desc = "Previous line" },
208 { on = "<Down>", run = "arrow next", desc = "Next line" },
209 { on = "<Left>", run = "swipe prev", desc = "Swipe to previous file" },
210 { on = "<Right>", run = "swipe next", desc = "Swipe to next file" },
211
212 # Copy
213 { on = [ "c", "c" ], run = "copy cell", desc = "Copy selected cell" },
214
215 # Help
216 { on = "~", run = "help", desc = "Open help" },
217 { on = "<F1>", run = "help", desc = "Open help" },
218]
219
220[pick]
221
222keymap = [
223 { on = "<Esc>", run = "close", desc = "Cancel pick" },
224 { on = "<C-[>", run = "close", desc = "Cancel pick" },
225 { on = "<C-c>", run = "close", desc = "Cancel pick" },
226 { on = "<Enter>", run = "close --submit", desc = "Submit the pick" },
227
228 { on = "k", run = "arrow prev", desc = "Previous option" },
229 { on = "j", run = "arrow next", desc = "Next option" },
230
231 { on = "<Up>", run = "arrow prev", desc = "Previous option" },
232 { on = "<Down>", run = "arrow next", desc = "Next option" },
233
234 # Help
235 { on = "~", run = "help", desc = "Open help" },
236 { on = "<F1>", run = "help", desc = "Open help" },
237]
238
239[input]
240
241keymap = [
242 { on = "<C-c>", run = "close", desc = "Cancel input" },
243 { on = "<Enter>", run = "close --submit", desc = "Submit input" },
244 { on = "<Esc>", run = "escape", desc = "Back to normal mode, or cancel input" },
245 { on = "<C-[>", run = "escape", desc = "Back to normal mode, or cancel input" },
246
247 # Mode
248 { on = "i", run = "insert", desc = "Enter insert mode" },
249 { on = "I", run = [ "move first-char", "insert" ], desc = "Move to the BOL, and enter insert mode" },
250 { on = "a", run = "insert --append", desc = "Enter append mode" },
251 { on = "A", run = [ "move eol", "insert --append" ], desc = "Move to the EOL, and enter append mode" },
252 { on = "v", run = "visual", desc = "Enter visual mode" },
253 { on = "r", run = "replace", desc = "Replace a single character" },
254
255 # Selection
256 { on = "V", run = [ "move bol", "visual", "move eol" ], desc = "Select from BOL to EOL" },
257 { on = "<C-A>", run = [ "move eol", "visual", "move bol" ], desc = "Select from EOL to BOL" },
258 { on = "<C-E>", run = [ "move bol", "visual", "move eol" ], desc = "Select from BOL to EOL" },
259
260 # Character-wise movement
261 { on = "h", run = "move -1", desc = "Move back a character" },
262 { on = "l", run = "move 1", desc = "Move forward a character" },
263 { on = "<Left>", run = "move -1", desc = "Move back a character" },
264 { on = "<Right>", run = "move 1", desc = "Move forward a character" },
265 { on = "<C-b>", run = "move -1", desc = "Move back a character" },
266 { on = "<C-f>", run = "move 1", desc = "Move forward a character" },
267
268 # Word-wise movement
269 { on = "b", run = "backward", desc = "Move back to the start of the current or previous word" },
270 { on = "B", run = "backward --far", desc = "Move back to the start of the current or previous WORD" },
271 { on = "w", run = "forward", desc = "Move forward to the start of the next word" },
272 { on = "W", run = "forward --far", desc = "Move forward to the start of the next WORD" },
273 { on = "e", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
274 { on = "E", run = "forward --far --end-of-word", desc = "Move forward to the end of the current or next WORD" },
275 { on = "<A-b>", run = "backward", desc = "Move back to the start of the current or previous word" },
276 { on = "<A-f>", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
277
278 # Line-wise movement
279 { on = "0", run = "move bol", desc = "Move to the BOL" },
280 { on = "$", run = "move eol", desc = "Move to the EOL" },
281 { on = "_", run = "move first-char", desc = "Move to the first non-whitespace character" },
282 { on = "^", run = "move first-char", desc = "Move to the first non-whitespace character" },
283 { on = "<C-a>", run = "move bol", desc = "Move to the BOL" },
284 { on = "<C-e>", run = "move eol", desc = "Move to the EOL" },
285 { on = "<Home>", run = "move bol", desc = "Move to the BOL" },
286 { on = "<End>", run = "move eol", desc = "Move to the EOL" },
287
288 # Delete
289 { on = "<Backspace>", run = "backspace", desc = "Delete the character before the cursor" },
290 { on = "<Delete>", run = "backspace --under", desc = "Delete the character under the cursor" },
291 { on = "<C-h>", run = "backspace", desc = "Delete the character before the cursor" },
292 { on = "<C-d>", run = "backspace --under", desc = "Delete the character under the cursor" },
293
294 # Kill
295 { on = "<C-u>", run = "kill bol", desc = "Kill backwards to the BOL" },
296 { on = "<C-k>", run = "kill eol", desc = "Kill forwards to the EOL" },
297 { on = "<C-w>", run = "kill backward", desc = "Kill backwards to the start of the current word" },
298 { on = "<A-d>", run = "kill forward", desc = "Kill forwards to the end of the current word" },
299
300 # Cut/Yank/Paste
301 { on = "d", run = "delete --cut", desc = "Cut selected characters" },
302 { on = "D", run = [ "delete --cut", "move eol" ], desc = "Cut until EOL" },
303 { on = "c", run = "delete --cut --insert", desc = "Cut selected characters, and enter insert mode" },
304 { on = "C", run = [ "delete --cut --insert", "move eol" ], desc = "Cut until EOL, and enter insert mode" },
305 { on = "s", run = [ "delete --cut --insert", "move 1" ], desc = "Cut current character, and enter insert mode" },
306 { on = "S", run = [ "move bol", "delete --cut --insert", "move eol" ], desc = "Cut from BOL until EOL, and enter insert mode" },
307 { on = "x", run = [ "delete --cut", "move 1 --in-operating" ], desc = "Cut current character" },
308 { on = "y", run = "yank", desc = "Copy selected characters" },
309 { on = "p", run = "paste", desc = "Paste copied characters after the cursor" },
310 { on = "P", run = "paste --before", desc = "Paste copied characters before the cursor" },
311
312 # Undo/Redo
313 { on = "u", run = "undo", desc = "Undo the last operation" },
314 { on = "<C-r>", run = "redo", desc = "Redo the last operation" },
315
316 # Help
317 { on = "~", run = "help", desc = "Open help" },
318 { on = "<F1>", run = "help", desc = "Open help" },
319]
320
321[confirm]
322
323keymap = [
324 { on = "<Esc>", run = "close", desc = "Cancel the confirm" },
325 { on = "<C-[>", run = "close", desc = "Cancel the confirm" },
326 { on = "<C-c>", run = "close", desc = "Cancel the confirm" },
327 { on = "<Enter>", run = "close --submit", desc = "Submit the confirm" },
328
329 { on = "n", run = "close", desc = "Cancel the confirm" },
330 { on = "y", run = "close --submit", desc = "Submit the confirm" },
331
332 { on = "k", run = "arrow prev", desc = "Previous line" },
333 { on = "j", run = "arrow next", desc = "Next line" },
334
335 { on = "<Up>", run = "arrow prev", desc = "Previous line" },
336 { on = "<Down>", run = "arrow next", desc = "Next line" },
337
338 # Help
339 { on = "~", run = "help", desc = "Open help" },
340 { on = "<F1>", run = "help", desc = "Open help" },
341]
342
343[cmp]
344
345keymap = [
346 { on = "<C-c>", run = "close", desc = "Cancel completion" },
347 { on = "<Tab>", run = "close --submit", desc = "Submit the completion" },
348 { on = "<Enter>", run = [ "close --submit", "input:close --submit" ], desc = "Complete and submit the input" },
349
350 { on = "<A-k>", run = "arrow prev", desc = "Previous item" },
351 { on = "<A-j>", run = "arrow next", desc = "Next item" },
352
353 { on = "<Up>", run = "arrow prev", desc = "Previous item" },
354 { on = "<Down>", run = "arrow next", desc = "Next item" },
355
356 { on = "<C-p>", run = "arrow prev", desc = "Previous item" },
357 { on = "<C-n>", run = "arrow next", desc = "Next item" },
358
359 # Help
360 { on = "~", run = "help", desc = "Open help" },
361 { on = "<F1>", run = "help", desc = "Open help" },
362]
363
364[help]
365
366keymap = [
367 { on = "<Esc>", run = "escape", desc = "Clear the filter, or hide the help" },
368 { on = "<C-[>", run = "escape", desc = "Clear the filter, or hide the help" },
369 { on = "<C-c>", run = "close", desc = "Hide the help" },
370
371 # Navigation
372 { on = "k", run = "arrow prev", desc = "Previous line" },
373 { on = "j", run = "arrow next", desc = "Next line" },
374
375 { on = "<Up>", run = "arrow prev", desc = "Previous line" },
376 { on = "<Down>", run = "arrow next", desc = "Next line" },
377
378 # Filtering
379 { on = "f", run = "filter", desc = "Filter help items" },
380]