bunmicro 0.8.3 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +20 -1
- package/package.json +1 -1
- package/runtime/help/defaultkeys.md +7 -0
- package/runtime/help/help.md +14 -9
- package/runtime/help/keybindings.md +32 -437
- package/runtime/syntax/javascript.yaml +49 -1
- package/runtime/syntax/python3.yaml +18 -0
- package/src/highlight/parser.js +77 -9
- package/src/index.js +157 -26
- package/src/plugins/js-bridge.js +5 -0
- package/src/screen/screen.js +13 -1
- package/src/screen/vt100.js +98 -9
- package/todo.txt +4 -0
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
# Keybindings
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
hotkeys are fully customizable to your liking.
|
|
3
|
+
- bunmicro has a plethora of hotkeys that make it easy and powerful to use.
|
|
5
4
|
|
|
6
|
-
Custom keybindings are
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
- Custom keybindings are not implemented in bunmicro for now
|
|
6
|
+
- For a list of actions like CursorUp
|
|
7
|
+
- Press Ctrl+E to show command prompt
|
|
8
|
+
- `> help actions`
|
|
9
|
+
- It is recommended to use jsplugins to register a command for such purposes
|
|
10
|
+
- Examples under runtime/jsplugins
|
|
11
|
+
- If you really wish to rebind keys, edit src/index.js and look for things like alt-d
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- For a more user-friendly list with
|
|
15
|
+
explanations of what the default hotkeys are and what they do
|
|
16
|
+
- Press Ctrl+E to show command prompt
|
|
17
|
+
- `> help defaultkeys`
|
|
18
|
+
- a json formatted list of default keys is included at the end of this document
|
|
13
19
|
|
|
14
|
-
If `~/.config/micro/bindings.json` does not exist, you can simply create it.
|
|
15
|
-
Micro will know what to do with it.
|
|
16
20
|
|
|
17
21
|
You can use Ctrl + arrows to move word by word (Alt + arrows for Mac). Alt + left and right
|
|
18
22
|
move the cursor to the start and end of the line (Ctrl + left/right for Mac), and Ctrl + up and down move the
|
|
@@ -20,171 +24,14 @@ cursor to the start and end of the buffer.
|
|
|
20
24
|
|
|
21
25
|
You can hold shift with all of these movement actions to select while moving.
|
|
22
26
|
|
|
23
|
-
## Rebinding keys
|
|
24
|
-
|
|
25
|
-
The bindings may be rebound using the `~/.config/micro/bindings.json` file.
|
|
26
|
-
Each key is bound to an action.
|
|
27
|
-
|
|
28
|
-
For example, to bind `Ctrl-y` to undo and `Ctrl-z` to redo, you could put the
|
|
29
|
-
following in the `bindings.json` file.
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{
|
|
33
|
-
"Ctrl-y": "Undo",
|
|
34
|
-
"Ctrl-z": "Redo"
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**Note:** The syntax `<Modifier><key>` is equivalent to `<Modifier>-<key>`. In
|
|
39
|
-
addition, `Ctrl-Shift` bindings are not supported by terminals, and are the same
|
|
40
|
-
as simply `Ctrl` bindings. This means that `CtrlG`, `Ctrl-G`, and `Ctrl-g` all
|
|
41
|
-
mean the same thing. However, for `Alt` this is not the case: `AltG` and `Alt-G`
|
|
42
|
-
mean `Alt-Shift-g`, while `Alt-g` does not require the Shift modifier.
|
|
43
|
-
|
|
44
|
-
In addition to editing your `~/.config/micro/bindings.json`, you can run
|
|
45
|
-
`>bind <keycombo> <action>` For a list of bindable actions, see below.
|
|
46
|
-
|
|
47
|
-
You can also chain commands when rebinding. For example, if you want `Alt-s` to
|
|
48
|
-
save and quit you can bind it like so:
|
|
49
|
-
|
|
50
|
-
```json
|
|
51
|
-
{
|
|
52
|
-
"Alt-s": "Save,Quit"
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Each action will return a success flag. Actions can be chained such that
|
|
57
|
-
the chain only continues when there are successes, or failures, or either.
|
|
58
|
-
The `,` separator will always chain to the next action. The `|` separator
|
|
59
|
-
will abort the chain if the action preceding it succeeds, and the `&` will
|
|
60
|
-
abort the chain if the action preceding it fails. For example, in the default
|
|
61
|
-
bindings, tab is bound as
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
"Tab": "Autocomplete|IndentSelection|InsertTab"
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
This means that if the `Autocomplete` action is successful, the chain will
|
|
68
|
-
abort. Otherwise, it will try `IndentSelection`, and if that fails too, it
|
|
69
|
-
will execute `InsertTab`. To use `,`, `|` or `&` in an action (as an argument
|
|
70
|
-
to a command, for example), escape it with `\` or wrap it in single or double
|
|
71
|
-
quotes.
|
|
72
|
-
|
|
73
|
-
If the action has an `onAction` lua callback, for example `onAutocomplete` (see
|
|
74
|
-
`> help plugins`), then the action is only considered successful if the action
|
|
75
|
-
itself succeeded *and* the callback returned true. If there are multiple
|
|
76
|
-
`onAction` callbacks for this action, registered by multiple plugins, then the
|
|
77
|
-
action is only considered successful if the action itself succeeded and all the
|
|
78
|
-
callbacks returned true.
|
|
79
|
-
|
|
80
|
-
## Binding commands
|
|
81
|
-
|
|
82
|
-
You can also bind a key to execute a command in command mode (see
|
|
83
|
-
`help commands`). Simply prepend the binding with `command:`. For example:
|
|
84
27
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"Alt-p": "command:pwd"
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
**Note for macOS**: By default, macOS terminals do not forward alt events and
|
|
28
|
+
## Note for macOS
|
|
29
|
+
- By default, macOS terminals do not forward alt events and
|
|
92
30
|
instead insert unicode characters. To fix this, do the following:
|
|
93
31
|
|
|
94
32
|
* iTerm2: select `Esc+` for `Left Option Key` in `Preferences->Profiles->Keys`.
|
|
95
33
|
* Terminal.app: Enable `Use Option key as Meta key` in `Preferences->Profiles->Keyboard`.
|
|
96
34
|
|
|
97
|
-
Now when you press `Alt-p` the `pwd` command will be executed which will show
|
|
98
|
-
your working directory in the infobar.
|
|
99
|
-
|
|
100
|
-
You can also bind an "editable" command with `command-edit:`. This means that
|
|
101
|
-
micro won't immediately execute the command when you press the binding, but
|
|
102
|
-
instead just place the string in the infobar in command mode. For example,
|
|
103
|
-
you could rebind `Ctrl-g` to `> help`:
|
|
104
|
-
|
|
105
|
-
```json
|
|
106
|
-
{
|
|
107
|
-
"Ctrl-g": "command-edit:help "
|
|
108
|
-
}
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Now when you press `Ctrl-g`, `help` will appear in the command bar and your
|
|
112
|
-
cursor will be placed after it (note the space in the json that controls the
|
|
113
|
-
cursor placement).
|
|
114
|
-
|
|
115
|
-
## Binding Lua functions
|
|
116
|
-
|
|
117
|
-
You can also bind a key to a Lua function provided by a plugin, or by your own
|
|
118
|
-
`~/.config/micro/init.lua`. For example:
|
|
119
|
-
|
|
120
|
-
```json
|
|
121
|
-
{
|
|
122
|
-
"Alt-q": "lua:foo.bar"
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
where `foo` is the name of the plugin and `bar` is the name of the lua function
|
|
127
|
-
in it, e.g.:
|
|
128
|
-
|
|
129
|
-
```lua
|
|
130
|
-
local micro = import("micro")
|
|
131
|
-
|
|
132
|
-
function bar(bp)
|
|
133
|
-
micro.InfoBar():Message("Bar action triggered")
|
|
134
|
-
return true
|
|
135
|
-
end
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
See `> help plugins` for more informations on how to write lua functions.
|
|
139
|
-
|
|
140
|
-
For `~/.config/micro/init.lua` the plugin name is `initlua` (so the keybinding
|
|
141
|
-
in this example would be `"Alt-q": "lua:initlua.bar"`).
|
|
142
|
-
|
|
143
|
-
The currently active bufpane is passed to the lua function as the argument. If
|
|
144
|
-
the key is a mouse button, e.g. `MouseLeft` or `MouseWheelUp`, the mouse event
|
|
145
|
-
info is passed to the lua function as the second argument, of type
|
|
146
|
-
`*tcell.EventMouse`. See https://pkg.go.dev/github.com/micro-editor/tcell/v2#EventMouse
|
|
147
|
-
for the description of this type and its methods.
|
|
148
|
-
|
|
149
|
-
The return value of the lua function defines whether the action has succeeded.
|
|
150
|
-
This is used when chaining lua functions with other actions. They can be chained
|
|
151
|
-
the same way as regular actions as described above, for example:
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
"Alt-q": "lua:initlua.bar|Quit"
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## Binding raw escape sequences
|
|
158
|
-
|
|
159
|
-
Only read this section if you are interested in binding keys that aren't on the
|
|
160
|
-
list of supported keys for binding.
|
|
161
|
-
|
|
162
|
-
One of the drawbacks of using a terminal-based editor is that the editor must
|
|
163
|
-
get all of its information about key events through the terminal. The terminal
|
|
164
|
-
sends these events in the form of escape sequences often (but not always)
|
|
165
|
-
starting with `0x1b`.
|
|
166
|
-
|
|
167
|
-
For example, if micro reads `\x1b[1;5D`, on most terminals this will mean the
|
|
168
|
-
user pressed CtrlLeft.
|
|
169
|
-
|
|
170
|
-
For many key chords though, the terminal won't send any escape code or will
|
|
171
|
-
send an escape code already in use. For example for `CtrlBackspace`, my
|
|
172
|
-
terminal sends `\u007f` (note this doesn't start with `0x1b`), which it also
|
|
173
|
-
sends for `Backspace` meaning micro can't bind `CtrlBackspace`.
|
|
174
|
-
|
|
175
|
-
However, some terminals do allow you to bind keys to send specific escape
|
|
176
|
-
sequences you define. Then from micro you can directly bind those escape
|
|
177
|
-
sequences to actions. For example, to bind `CtrlBackspace` you can instruct
|
|
178
|
-
your terminal to send `\x1bctrlback` and then bind it in `bindings.json`:
|
|
179
|
-
|
|
180
|
-
```json
|
|
181
|
-
{
|
|
182
|
-
"\u001bctrlback": "DeleteWordLeft"
|
|
183
|
-
}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
Here are some instructions for sending raw escapes in different terminals
|
|
187
|
-
|
|
188
35
|
### iTerm2
|
|
189
36
|
|
|
190
37
|
In iTerm2, you can do this in `Preferences->Profiles->Keys` then click the
|
|
@@ -192,156 +39,8 @@ In iTerm2, you can do this in `Preferences->Profiles->Keys` then click the
|
|
|
192
39
|
For the above example your would type `ctrlback` into the box (the `\x1b`) is
|
|
193
40
|
automatically sent by iTerm2.
|
|
194
41
|
|
|
195
|
-
### Linux using loadkeys
|
|
196
|
-
|
|
197
|
-
You can do this in linux using the loadkeys program.
|
|
198
|
-
|
|
199
|
-
Coming soon!
|
|
200
|
-
|
|
201
|
-
## Unbinding keys
|
|
202
|
-
|
|
203
|
-
It is also possible to disable any of the default key bindings by use of the
|
|
204
|
-
`None` action in the user's `bindings.json` file.
|
|
205
|
-
|
|
206
|
-
## Bindable actions and bindable keys
|
|
207
42
|
|
|
208
|
-
|
|
209
|
-
which you can use, but not all of them. Here is a full list of both.
|
|
210
|
-
|
|
211
|
-
Full list of possible actions:
|
|
212
|
-
|
|
213
|
-
```
|
|
214
|
-
CursorUp
|
|
215
|
-
CursorDown
|
|
216
|
-
CursorPageUp
|
|
217
|
-
CursorPageDown
|
|
218
|
-
CursorLeft
|
|
219
|
-
CursorRight
|
|
220
|
-
CursorStart
|
|
221
|
-
CursorEnd
|
|
222
|
-
CursorToViewTop
|
|
223
|
-
CursorToViewCenter
|
|
224
|
-
CursorToViewBottom
|
|
225
|
-
SelectToStart
|
|
226
|
-
SelectToEnd
|
|
227
|
-
SelectUp
|
|
228
|
-
SelectDown
|
|
229
|
-
SelectLeft
|
|
230
|
-
SelectRight
|
|
231
|
-
WordRight
|
|
232
|
-
WordLeft
|
|
233
|
-
SubWordRight
|
|
234
|
-
SubWordLeft
|
|
235
|
-
SelectWordRight
|
|
236
|
-
SelectWordLeft
|
|
237
|
-
SelectSubWordRight
|
|
238
|
-
SelectSubWordLeft
|
|
239
|
-
DeleteWordRight
|
|
240
|
-
DeleteWordLeft
|
|
241
|
-
DeleteSubWordRight
|
|
242
|
-
DeleteSubWordLeft
|
|
243
|
-
SelectLine
|
|
244
|
-
SelectToStartOfLine
|
|
245
|
-
SelectToStartOfText
|
|
246
|
-
SelectToStartOfTextToggle
|
|
247
|
-
SelectToEndOfLine
|
|
248
|
-
ParagraphPrevious
|
|
249
|
-
ParagraphNext
|
|
250
|
-
SelectToParagraphPrevious
|
|
251
|
-
SelectToParagraphNext
|
|
252
|
-
InsertNewline
|
|
253
|
-
Backspace
|
|
254
|
-
Delete
|
|
255
|
-
InsertTab
|
|
256
|
-
Save
|
|
257
|
-
SaveAll
|
|
258
|
-
SaveAs
|
|
259
|
-
Find
|
|
260
|
-
FindLiteral
|
|
261
|
-
FindNext
|
|
262
|
-
FindPrevious
|
|
263
|
-
DiffNext
|
|
264
|
-
DiffPrevious
|
|
265
|
-
Center
|
|
266
|
-
Undo
|
|
267
|
-
Redo
|
|
268
|
-
Copy
|
|
269
|
-
CopyLine
|
|
270
|
-
Cut
|
|
271
|
-
CutLine
|
|
272
|
-
Duplicate
|
|
273
|
-
DuplicateLine
|
|
274
|
-
DeleteLine
|
|
275
|
-
MoveLinesUp
|
|
276
|
-
MoveLinesDown
|
|
277
|
-
IndentSelection
|
|
278
|
-
OutdentSelection
|
|
279
|
-
Autocomplete
|
|
280
|
-
CycleAutocompleteBack
|
|
281
|
-
OutdentLine
|
|
282
|
-
IndentLine
|
|
283
|
-
Paste
|
|
284
|
-
PastePrimary
|
|
285
|
-
SelectAll
|
|
286
|
-
OpenFile
|
|
287
|
-
Start
|
|
288
|
-
End
|
|
289
|
-
PageUp
|
|
290
|
-
PageDown
|
|
291
|
-
SelectPageUp
|
|
292
|
-
SelectPageDown
|
|
293
|
-
HalfPageUp
|
|
294
|
-
HalfPageDown
|
|
295
|
-
StartOfText
|
|
296
|
-
StartOfTextToggle
|
|
297
|
-
StartOfLine
|
|
298
|
-
EndOfLine
|
|
299
|
-
ToggleHelp
|
|
300
|
-
ToggleKeyMenu
|
|
301
|
-
ToggleDiffGutter
|
|
302
|
-
ToggleRuler
|
|
303
|
-
ToggleHighlightSearch
|
|
304
|
-
UnhighlightSearch
|
|
305
|
-
ResetSearch
|
|
306
|
-
ClearStatus
|
|
307
|
-
ShellMode
|
|
308
|
-
CommandMode
|
|
309
|
-
ToggleOverwriteMode
|
|
310
|
-
Escape
|
|
311
|
-
Quit
|
|
312
|
-
QuitAll
|
|
313
|
-
ForceQuit
|
|
314
|
-
AddTab
|
|
315
|
-
PreviousTab
|
|
316
|
-
NextTab
|
|
317
|
-
FirstTab
|
|
318
|
-
LastTab
|
|
319
|
-
NextSplit
|
|
320
|
-
PreviousSplit
|
|
321
|
-
FirstSplit
|
|
322
|
-
LastSplit
|
|
323
|
-
Unsplit
|
|
324
|
-
VSplit
|
|
325
|
-
HSplit
|
|
326
|
-
ToggleMacro
|
|
327
|
-
PlayMacro
|
|
328
|
-
Suspend (Unix only)
|
|
329
|
-
ScrollUp
|
|
330
|
-
ScrollDown
|
|
331
|
-
SpawnMultiCursor
|
|
332
|
-
SpawnMultiCursorUp
|
|
333
|
-
SpawnMultiCursorDown
|
|
334
|
-
SpawnMultiCursorSelect
|
|
335
|
-
RemoveMultiCursor
|
|
336
|
-
RemoveAllMultiCursors
|
|
337
|
-
SkipMultiCursor
|
|
338
|
-
SkipMultiCursorBack
|
|
339
|
-
JumpToMatchingBrace
|
|
340
|
-
JumpLine
|
|
341
|
-
Deselect
|
|
342
|
-
ClearInfo
|
|
343
|
-
None
|
|
344
|
-
```
|
|
43
|
+
## Actions binding (not implemented)
|
|
345
44
|
|
|
346
45
|
The `StartOfTextToggle` and `SelectToStartOfTextToggle` actions toggle between
|
|
347
46
|
jumping to the start of the text (first) and start of the line.
|
|
@@ -511,10 +210,7 @@ MouseWheelLeft
|
|
|
511
210
|
MouseWheelRight
|
|
512
211
|
```
|
|
513
212
|
|
|
514
|
-
## Key sequences
|
|
515
213
|
|
|
516
|
-
Key sequences can be bound by specifying valid keys one after another in brackets, such
|
|
517
|
-
as `<Ctrl-x><Ctrl-c>`.
|
|
518
214
|
|
|
519
215
|
# Default keybinding configuration.
|
|
520
216
|
|
|
@@ -601,17 +297,24 @@ conventions for text editing defaults.
|
|
|
601
297
|
"Ctrl-q": "Quit",
|
|
602
298
|
"Ctrl-e": "CommandMode",
|
|
603
299
|
"Ctrl-w": "NextSplit|FirstSplit",
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
// macro insert
|
|
303
|
+
// not implemented yet
|
|
604
304
|
"Ctrl-u": "ToggleMacro",
|
|
605
305
|
"Ctrl-j": "PlayMacro",
|
|
606
306
|
"Insert": "ToggleOverwriteMode",
|
|
307
|
+
|
|
607
308
|
|
|
608
309
|
// Emacs-style keybindings
|
|
310
|
+
// not implemented yet
|
|
609
311
|
"Alt-f": "WordRight",
|
|
610
312
|
"Alt-b": "WordLeft",
|
|
611
313
|
"Alt-a": "StartOfLine",
|
|
612
314
|
"Alt-e": "EndOfLine",
|
|
613
315
|
|
|
614
316
|
// Integration with file managers
|
|
317
|
+
// not implemented yet
|
|
615
318
|
"F2": "Save",
|
|
616
319
|
"F3": "Find",
|
|
617
320
|
"F4": "Quit",
|
|
@@ -629,6 +332,7 @@ conventions for text editing defaults.
|
|
|
629
332
|
"Ctrl-MouseLeft": "MouseMultiCursor",
|
|
630
333
|
|
|
631
334
|
// Multi-cursor bindings
|
|
335
|
+
// not implemented yet
|
|
632
336
|
"Alt-n": "SpawnMultiCursor",
|
|
633
337
|
"AltShiftUp": "SpawnMultiCursorUp",
|
|
634
338
|
"AltShiftDown": "SpawnMultiCursorDown",
|
|
@@ -639,122 +343,13 @@ conventions for text editing defaults.
|
|
|
639
343
|
}
|
|
640
344
|
```
|
|
641
345
|
|
|
642
|
-
## Pane type bindings
|
|
643
|
-
|
|
644
|
-
Keybindings can be specified for different pane types as well. For example, to
|
|
645
|
-
make a binding that only affects the command bar, use the `command` subgroup:
|
|
646
|
-
|
|
647
|
-
```
|
|
648
|
-
{
|
|
649
|
-
"command": {
|
|
650
|
-
"Ctrl-w": "WordLeft"
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
```
|
|
654
|
-
|
|
655
|
-
The possible pane types are `buffer` (normal buffer), `command` (command bar),
|
|
656
|
-
and `terminal` (terminal pane). The defaults for the command and terminal panes
|
|
657
|
-
are given below:
|
|
658
|
-
|
|
659
|
-
```
|
|
660
|
-
{
|
|
661
|
-
"terminal": {
|
|
662
|
-
"<Ctrl-q><Ctrl-q>": "Exit",
|
|
663
|
-
"<Ctrl-e><Ctrl-e>": "CommandMode",
|
|
664
|
-
"<Ctrl-w><Ctrl-w>": "NextSplit"
|
|
665
|
-
},
|
|
666
|
-
|
|
667
|
-
"command": {
|
|
668
|
-
"Up": "HistoryUp",
|
|
669
|
-
"Down": "HistoryDown",
|
|
670
|
-
"Right": "CursorRight",
|
|
671
|
-
"Left": "CursorLeft",
|
|
672
|
-
"ShiftUp": "SelectUp",
|
|
673
|
-
"ShiftDown": "SelectDown",
|
|
674
|
-
"ShiftLeft": "SelectLeft",
|
|
675
|
-
"ShiftRight": "SelectRight",
|
|
676
|
-
"AltLeft": "StartOfTextToggle",
|
|
677
|
-
"AltRight": "EndOfLine",
|
|
678
|
-
"AltUp": "CursorStart",
|
|
679
|
-
"AltDown": "CursorEnd",
|
|
680
|
-
"AltShiftRight": "SelectWordRight",
|
|
681
|
-
"AltShiftLeft": "SelectWordLeft",
|
|
682
|
-
"CtrlLeft": "WordLeft",
|
|
683
|
-
"CtrlRight": "WordRight",
|
|
684
|
-
"CtrlShiftLeft": "SelectToStartOfTextToggle",
|
|
685
|
-
"ShiftHome": "SelectToStartOfTextToggle",
|
|
686
|
-
"CtrlShiftRight": "SelectToEndOfLine",
|
|
687
|
-
"ShiftEnd": "SelectToEndOfLine",
|
|
688
|
-
"CtrlUp": "CursorStart",
|
|
689
|
-
"CtrlDown": "CursorEnd",
|
|
690
|
-
"CtrlShiftUp": "SelectToStart",
|
|
691
|
-
"CtrlShiftDown": "SelectToEnd",
|
|
692
|
-
"Enter": "ExecuteCommand",
|
|
693
|
-
"CtrlH": "Backspace",
|
|
694
|
-
"Backspace": "Backspace",
|
|
695
|
-
"OldBackspace": "Backspace",
|
|
696
|
-
"Alt-CtrlH": "DeleteWordLeft",
|
|
697
|
-
"Alt-Backspace": "DeleteWordLeft",
|
|
698
|
-
"Tab": "CommandComplete",
|
|
699
|
-
"Backtab": "CycleAutocompleteBack",
|
|
700
|
-
"Ctrl-z": "Undo",
|
|
701
|
-
"Ctrl-y": "Redo",
|
|
702
|
-
"Ctrl-c": "Copy",
|
|
703
|
-
"Ctrl-x": "Cut",
|
|
704
|
-
"Ctrl-k": "CutLine",
|
|
705
|
-
"Ctrl-v": "Paste",
|
|
706
|
-
"Home": "StartOfTextToggle",
|
|
707
|
-
"End": "EndOfLine",
|
|
708
|
-
"CtrlHome": "CursorStart",
|
|
709
|
-
"CtrlEnd": "CursorEnd",
|
|
710
|
-
"Delete": "Delete",
|
|
711
|
-
"Ctrl-q": "AbortCommand",
|
|
712
|
-
"Ctrl-e": "EndOfLine",
|
|
713
|
-
"Ctrl-a": "StartOfLine",
|
|
714
|
-
"Ctrl-w": "DeleteWordLeft",
|
|
715
|
-
"Insert": "ToggleOverwriteMode",
|
|
716
|
-
"Ctrl-b": "WordLeft",
|
|
717
|
-
"Ctrl-f": "WordRight",
|
|
718
|
-
"Ctrl-d": "DeleteWordLeft",
|
|
719
|
-
"Ctrl-m": "ExecuteCommand",
|
|
720
|
-
"Ctrl-n": "HistoryDown",
|
|
721
|
-
"Ctrl-p": "HistoryUp",
|
|
722
|
-
"Ctrl-u": "SelectToStart",
|
|
723
|
-
|
|
724
|
-
// Emacs-style keybindings
|
|
725
|
-
"Alt-f": "WordRight",
|
|
726
|
-
"Alt-b": "WordLeft",
|
|
727
|
-
"Alt-a": "StartOfText",
|
|
728
|
-
"Alt-e": "EndOfLine",
|
|
729
|
-
|
|
730
|
-
// Integration with file managers
|
|
731
|
-
"F10": "AbortCommand",
|
|
732
|
-
"Esc": "AbortCommand",
|
|
733
|
-
|
|
734
|
-
// Mouse bindings
|
|
735
|
-
"MouseWheelUp": "HistoryUp",
|
|
736
|
-
"MouseWheelDown": "HistoryDown",
|
|
737
|
-
"MouseLeft": "MousePress",
|
|
738
|
-
"MouseLeftDrag": "MouseDrag",
|
|
739
|
-
"MouseLeftRelease": "MouseRelease",
|
|
740
|
-
"MouseMiddle": "PastePrimary"
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
```
|
|
744
346
|
|
|
745
347
|
## Final notes
|
|
746
348
|
|
|
747
|
-
Note: On some old terminal emulators and on Windows machines, `Ctrl-h` should be
|
|
748
|
-
used for backspace.
|
|
749
|
-
|
|
750
|
-
Additionally, alt keys can be bound by using `Alt-key`. For example `Alt-a` or
|
|
751
|
-
`Alt-Up`. Micro supports an optional `-` between modifiers like `Alt` and
|
|
752
|
-
`Ctrl` so `Alt-a` could be rewritten as `Alta` (case matters for alt bindings).
|
|
753
|
-
This is why in the default keybindings you can see `AltShiftLeft` instead of
|
|
754
|
-
`Alt-ShiftLeft` (they are equivalent).
|
|
349
|
+
- Note: On some old terminal emulators and on Windows machines, `Ctrl-h` should be used for backspace.
|
|
755
350
|
|
|
756
|
-
Please note that terminal emulators are strange applications and micro only
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
351
|
+
- Please note that terminal emulators are strange applications and micro only receives key events that the terminal decides to send.
|
|
352
|
+
- Some terminal emulators may not send certain events even if this document says micro can receive the event.
|
|
353
|
+
- To see exactly what micro receives from the terminal when you press a key,
|
|
354
|
+
- Press Ctrl+E to show command prompt
|
|
355
|
+
- then run the `> raw` command.
|
|
@@ -3,7 +3,7 @@ filetype: javascript
|
|
|
3
3
|
detect:
|
|
4
4
|
filename: "(\\.(m|c)?js$|\\.es[5678]?$)"
|
|
5
5
|
header: "^#!.*/(env +)?(bun|node)( |$)"
|
|
6
|
-
|
|
6
|
+
# console
|
|
7
7
|
rules:
|
|
8
8
|
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
|
9
9
|
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
|
@@ -74,3 +74,51 @@ rules:
|
|
|
74
74
|
# function documentation
|
|
75
75
|
- identifier: "\\s\\*\\s.*"
|
|
76
76
|
- todo: "(TODO|XXX|FIXME)"
|
|
77
|
+
|
|
78
|
+
# autocomplete-reference: Object constructor/static properties and methods (MDN Object)
|
|
79
|
+
# Object.length Object.name Object.prototype Object.assign Object.create Object.defineProperties Object.defineProperty Object.entries Object.freeze Object.fromEntries Object.getOwnPropertyDescriptor Object.getOwnPropertyDescriptors Object.getOwnPropertyNames Object.getOwnPropertySymbols Object.getPrototypeOf Object.groupBy Object.hasOwn Object.is Object.isExtensible Object.isFrozen Object.isSealed Object.keys Object.preventExtensions Object.seal Object.setPrototypeOf Object.values
|
|
80
|
+
# autocomplete-reference: Object.prototype properties and methods (MDN Object)
|
|
81
|
+
# Object.prototype.__proto__ Object.prototype.constructor Object.prototype.__defineGetter__ Object.prototype.__defineSetter__ Object.prototype.__lookupGetter__ Object.prototype.__lookupSetter__ Object.prototype.hasOwnProperty Object.prototype.isPrototypeOf Object.prototype.propertyIsEnumerable Object.prototype.toLocaleString Object.prototype.toString Object.prototype.valueOf
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# autocomplete-reference: ECMAScript standard built-ins (MDN Global_Objects)
|
|
85
|
+
# globalThis Infinity NaN undefined eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape
|
|
86
|
+
# Object Function Boolean Symbol Error AggregateError EvalError RangeError ReferenceError SuppressedError SyntaxError TypeError URIError InternalError
|
|
87
|
+
# Number BigInt Math Date Temporal String RegExp
|
|
88
|
+
# Array TypedArray Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array BigInt64Array BigUint64Array Float16Array Float32Array Float64Array
|
|
89
|
+
# Map Set WeakMap WeakSet ArrayBuffer SharedArrayBuffer DataView Atomics JSON stringify parse WeakRef FinalizationRegistry
|
|
90
|
+
# Iterator AsyncIterator Promise GeneratorFunction AsyncGeneratorFunction Generator AsyncGenerator AsyncFunction DisposableStack AsyncDisposableStack
|
|
91
|
+
# Reflect Proxy Intl Collator DateTimeFormat DisplayNames DurationFormat ListFormat Locale NumberFormat PluralRules RelativeTimeFormat Segmenter
|
|
92
|
+
# autocomplete-reference: Browser globals and Web API interfaces (MDN Web/API)
|
|
93
|
+
# window self globalThis document navigator location history screen frames parent top opener origin name status closed crossOriginIsolated isSecureContext customElements visualViewport
|
|
94
|
+
# localStorage sessionStorage indexedDB caches cookieStore scheduler trustedTypes performance crypto console
|
|
95
|
+
# alert confirm prompt print open close focus blur stop find scroll scrollTo scrollBy scrollX scrollY moveTo moveBy resizeTo resizeBy
|
|
96
|
+
# getComputedStyle matchMedia requestAnimationFrame cancelAnimationFrame requestIdleCallback cancelIdleCallback structuredClone postMessage dispatchEvent addEventListener removeEventListener
|
|
97
|
+
# fetch setTimeout clearTimeout setInterval clearInterval queueMicrotask atob btoa createImageBitmap reportError
|
|
98
|
+
# AbortController AbortSignal AbstractRange AnalyserNode Animation AnimationEffect AnimationEvent AnimationPlaybackEvent AnimationTimeline Attr Audio AudioBuffer AudioBufferSourceNode AudioContext AudioData AudioDecoder AudioDestinationNode AudioEncoder AudioListener AudioNode AudioParam AudioParamMap AudioProcessingEvent AudioScheduledSourceNode AudioSinkInfo AudioWorklet AudioWorkletGlobalScope AudioWorkletNode AudioWorkletProcessor AuthenticatorAssertionResponse AuthenticatorAttestationResponse AuthenticatorResponse
|
|
99
|
+
# BarcodeDetector BatteryManager BeforeUnloadEvent BiquadFilterNode Blob BlobEvent Bluetooth BluetoothAdvertisingEvent BluetoothCharacteristicProperties BluetoothDevice BluetoothRemoteGATTCharacteristic BluetoothRemoteGATTDescriptor BluetoothRemoteGATTServer BluetoothRemoteGATTService BluetoothUUID BroadcastChannel BrowserCaptureMediaStreamTrack ByteLengthQueuingStrategy
|
|
100
|
+
# CSS CSSAnimation CSSConditionRule CSSContainerRule CSSCounterStyleRule CSSFontFaceRule CSSFontFeatureValuesRule CSSFontPaletteValuesRule CSSGroupingRule CSSImageValue CSSImportRule CSSKeyframeRule CSSKeyframesRule CSSKeywordValue CSSLayerBlockRule CSSLayerStatementRule CSSMathClamp CSSMathInvert CSSMathMax CSSMathMin CSSMathNegate CSSMathProduct CSSMathSum CSSMathValue CSSMatrixComponent CSSMediaRule CSSNamespaceRule CSSNumericArray CSSNumericValue CSSPageRule CSSPerspective CSSPositionValue CSSPropertyRule CSSRotate CSSRule CSSRuleList CSSScale CSSScopeRule CSSSkew CSSSkewX CSSSkewY CSSStartingStyleRule CSSStyleDeclaration CSSStyleRule CSSStyleSheet CSSStyleValue CSSSupportsRule CSSTransformComponent CSSTransformValue CSSTransition CSSTranslate CSSUnitValue CSSUnparsedValue CSSVariableReferenceValue
|
|
101
|
+
# Cache CacheStorage CanvasCaptureMediaStreamTrack CanvasGradient CanvasPattern CanvasRenderingContext2D CaptureController CaretPosition ChannelMergerNode ChannelSplitterNode CharacterData Clipboard ClipboardEvent ClipboardItem CloseEvent Comment CompositionEvent CompressionStream ConstantSourceNode ContentVisibilityAutoStateChangeEvent ConvolverNode CountQueuingStrategy Credential CredentialsContainer Crypto CryptoKey CustomElementRegistry CustomEvent
|
|
102
|
+
# DOMError DOMException DOMImplementation DOMMatrix DOMMatrixReadOnly DOMParser DOMPoint DOMPointReadOnly DOMQuad DOMRect DOMRectReadOnly DOMStringList DOMStringMap DOMTokenList DataTransfer DataTransferItem DataTransferItemList DecompressionStream DelayNode DeviceMotionEvent DeviceOrientationEvent DevicePosture DirectoryEntry DirectoryReader Document DocumentFragment DocumentPictureInPicture DocumentPictureInPictureEvent DocumentType DragEvent DynamicsCompressorNode
|
|
103
|
+
# EditContext Element ElementInternals EncodedAudioChunk EncodedVideoChunk ErrorEvent Event EventCounts EventSource EventTarget ExtendableCookieChangeEvent ExtendableEvent EyeDropper
|
|
104
|
+
# FeaturePolicy FederatedCredential Fence File FileList FileReader FileSystem FileSystemDirectoryEntry FileSystemDirectoryHandle FileSystemDirectoryReader FileSystemEntry FileSystemFileEntry FileSystemFileHandle FileSystemHandle FileSystemObserver FileSystemSyncAccessHandle FileSystemWritableFileStream FocusEvent FontData FontFace FontFaceSet FontFaceSetLoadEvent FormData FormDataEvent
|
|
105
|
+
# GPU GPUAdapter GPUAdapterInfo GPUBindGroup GPUBindGroupLayout GPUBuffer GPUCanvasContext GPUCommandBuffer GPUCommandEncoder GPUCompilationInfo GPUCompilationMessage GPUComputePassEncoder GPUComputePipeline GPUDevice GPUDeviceLostInfo GPUError GPUExternalTexture GPUInternalError GPUMapMode GPUOutOfMemoryError GPUPipelineError GPUPipelineLayout GPUQuerySet GPUQueue GPURenderBundle GPURenderBundleEncoder GPURenderPassEncoder GPURenderPipeline GPUSampler GPUShaderModule GPUSupportedFeatures GPUSupportedLimits GPUTexture GPUTextureView GPUUncapturedErrorEvent GPUValidationError Gamepad GamepadButton GamepadEvent GamepadHapticActuator Geolocation GeolocationCoordinates GeolocationPosition GeolocationPositionError GravitySensor Gyroscope
|
|
106
|
+
# HTMLAllCollection HTMLAnchorElement HTMLAreaElement HTMLAudioElement HTMLBRElement HTMLBaseElement HTMLBodyElement HTMLButtonElement HTMLCanvasElement HTMLCollection HTMLDListElement HTMLDataElement HTMLDataListElement HTMLDetailsElement HTMLDialogElement HTMLDivElement HTMLDocument HTMLElement HTMLEmbedElement HTMLFencedFrameElement HTMLFieldSetElement HTMLFontElement HTMLFormControlsCollection HTMLFormElement HTMLFrameElement HTMLFrameSetElement HTMLHRElement HTMLHeadElement HTMLHeadingElement HTMLHtmlElement HTMLIFrameElement HTMLImageElement HTMLInputElement HTMLLIElement HTMLLabelElement HTMLLegendElement HTMLLinkElement HTMLMapElement HTMLMarqueeElement HTMLMediaElement HTMLMenuElement HTMLMetaElement HTMLMeterElement HTMLModElement HTMLOListElement HTMLObjectElement HTMLOptGroupElement HTMLOptionElement HTMLOptionsCollection HTMLOutputElement HTMLParagraphElement HTMLParamElement HTMLPictureElement HTMLPreElement HTMLProgressElement HTMLQuoteElement HTMLScriptElement HTMLSelectElement HTMLSelectedContentElement HTMLSlotElement HTMLSourceElement HTMLSpanElement HTMLStyleElement HTMLTableCaptionElement HTMLTableCellElement HTMLTableColElement HTMLTableElement HTMLTableRowElement HTMLTableSectionElement HTMLTemplateElement HTMLTextAreaElement HTMLTimeElement HTMLTitleElement HTMLTrackElement HTMLUListElement HTMLUnknownElement HTMLVideoElement Headers Highlight HighlightRegistry History IDBCursor IDBCursorWithValue IDBDatabase IDBFactory IDBIndex IDBKeyRange IDBObjectStore IDBOpenDBRequest IDBRequest IDBTransaction IDBVersionChangeEvent IdleDeadline ImageBitmap ImageBitmapRenderingContext ImageCapture ImageData ImageDecoder ImageTrack ImageTrackList Ink InputDeviceCapabilities InputDeviceInfo InputEvent InstallEvent IntersectionObserver IntersectionObserverEntry
|
|
107
|
+
# Keyboard KeyboardEvent KeyboardLayoutMap KeyframeEffect LanguageDetector LargestContentfulPaint LaunchParams LaunchQueue LayoutShift LayoutShiftAttribution LinearAccelerationSensor Location Lock LockManager Magnetometer ManagedMediaSource ManagedSourceBuffer MathMLElement MediaCapabilities MediaDeviceInfo MediaDevices MediaElementAudioSourceNode MediaEncryptedEvent MediaError MediaKeyMessageEvent MediaKeys MediaKeySession MediaKeyStatusMap MediaKeySystemAccess MediaList MediaMetadata MediaQueryList MediaQueryListEvent MediaRecorder MediaRecorderErrorEvent MediaSession MediaSource MediaSourceHandle MediaStream MediaStreamAudioDestinationNode MediaStreamAudioSourceNode MediaStreamEvent MediaStreamTrack MediaStreamTrackAudioSourceNode MediaStreamTrackEvent MediaStreamTrackGenerator MediaStreamTrackProcessor MediaTrackConstraints MediaTrackSettings MediaTrackSupportedConstraints MessageChannel MessageEvent MessagePort MIDIAccess MIDIConnectionEvent MIDIInput MIDIInputMap MIDIMessageEvent MIDIOutput MIDIOutputMap MIDIPort MimeType MimeTypeArray MouseEvent MutationEvent MutationObserver MutationRecord
|
|
108
|
+
# NamedNodeMap NavigateEvent Navigation NavigationActivation NavigationCurrentEntryChangeEvent NavigationDestination NavigationHistoryEntry NavigationPrecommitController NavigationPreloadManager NavigationTransition Navigator NavigatorLogin NavigatorUAData NDEFMessage NDEFReader NDEFReadingEvent NDEFRecord NetworkInformation Node NodeIterator NodeList Notification NotificationEvent OffscreenCanvas OfflineAudioCompletionEvent OfflineAudioContext OrientationSensor OscillatorNode OverconstrainedError PageRevealEvent PageSwapEvent PageTransitionEvent PannerNode PasswordCredential Path2D PaymentAddress PaymentMethodChangeEvent PaymentRequest PaymentRequestUpdateEvent PaymentResponse Performance PerformanceElementTiming PerformanceEntry PerformanceEventTiming PerformanceLongAnimationFrameTiming PerformanceLongTaskTiming PerformanceMark PerformanceMeasure PerformanceNavigationTiming PerformanceObserver PerformanceObserverEntryList PerformancePaintTiming PerformanceResourceTiming PerformanceScriptTiming PerformanceServerTiming PerformanceTiming PeriodicSyncManager Permissions PermissionStatus PictureInPictureEvent PictureInPictureWindow Plugin PluginArray PointerEvent PopStateEvent Presentation PresentationAvailability PresentationConnection PresentationConnectionAvailableEvent PresentationConnectionCloseEvent PresentationConnectionList PresentationReceiver PresentationRequest PressureObserver PressureRecord ProcessingInstruction ProgressEvent PromiseRejectionEvent PublicKeyCredential PushEvent PushManager PushMessageData PushSubscription PushSubscriptionOptions
|
|
109
|
+
# RTCCertificate RTCDTMFSender RTCDTMFToneChangeEvent RTCDataChannel RTCDataChannelEvent RTCDtlsTransport RTCEncodedAudioFrame RTCEncodedVideoFrame RTCError RTCErrorEvent RTCIceCandidate RTCIceTransport RTCPeerConnection RTCPeerConnectionIceErrorEvent RTCPeerConnectionIceEvent RTCRtpReceiver RTCRtpScriptTransformer RTCRtpSender RTCRtpTransceiver RTCSctpTransport RTCSessionDescription RTCStatsReport RTCTrackEvent RadioNodeList Range ReadableByteStreamController ReadableStream ReadableStreamBYOBReader ReadableStreamBYOBRequest ReadableStreamDefaultController ReadableStreamDefaultReader RelativeOrientationSensor RemotePlayback Report ReportBody ReportingObserver Request ResizeObserver ResizeObserverEntry ResizeObserverSize Response SVGAElement SVGAngle SVGAnimateElement SVGAnimateMotionElement SVGAnimateTransformElement SVGAnimatedAngle SVGAnimatedBoolean SVGAnimatedEnumeration SVGAnimatedInteger SVGAnimatedLength SVGAnimatedLengthList SVGAnimatedNumber SVGAnimatedNumberList SVGAnimatedPreserveAspectRatio SVGAnimatedRect SVGAnimatedString SVGAnimatedTransformList SVGAnimationElement SVGCircleElement SVGClipPathElement SVGComponentTransferFunctionElement SVGDefsElement SVGDescElement SVGElement SVGEllipseElement SVGFEBlendElement SVGFEColorMatrixElement SVGFEComponentTransferElement SVGFECompositeElement SVGFEConvolveMatrixElement SVGFEDiffuseLightingElement SVGFEDisplacementMapElement SVGFEDistantLightElement SVGFEDropShadowElement SVGFEFloodElement SVGFEFuncAElement SVGFEFuncBElement SVGFEFuncGElement SVGFEFuncRElement SVGFEGaussianBlurElement SVGFEImageElement SVGFEMergeElement SVGFEMergeNodeElement SVGFEMorphologyElement SVGFEOffsetElement SVGFEPointLightElement SVGFESpecularLightingElement SVGFESpotLightElement SVGFETileElement SVGFETurbulenceElement SVGFilterElement SVGForeignObjectElement SVGGElement SVGGeometryElement SVGGradientElement SVGGraphicsElement SVGImageElement SVGLength SVGLengthList SVGLineElement SVGLinearGradientElement SVGMPathElement SVGMarkerElement SVGMaskElement SVGMatrix SVGMetadataElement SVGNumber SVGNumberList SVGPathElement SVGPatternElement SVGPoint SVGPointList SVGPolygonElement SVGPolylineElement SVGPreserveAspectRatio SVGRadialGradientElement SVGRect SVGRectElement SVGSVGElement SVGScriptElement SVGSetElement SVGStopElement SVGStringList SVGStyleElement SVGSwitchElement SVGSymbolElement SVGTSpanElement SVGTextContentElement SVGTextElement SVGTextPathElement SVGTextPositioningElement SVGTitleElement SVGTransform SVGTransformList SVGUnitTypes SVGUseElement SVGViewElement Screen ScreenDetailed ScreenDetails ScreenOrientation ScriptProcessorNode SecurityPolicyViolationEvent Selection Sensor SensorErrorEvent Serial SerialPort ServiceWorker ServiceWorkerContainer ServiceWorkerGlobalScope ServiceWorkerRegistration ShadowRoot SharedWorker SourceBuffer SourceBufferList SpeechRecognition SpeechRecognitionAlternative SpeechRecognitionErrorEvent SpeechRecognitionEvent SpeechRecognitionResult SpeechRecognitionResultList SpeechSynthesis SpeechSynthesisErrorEvent SpeechSynthesisEvent SpeechSynthesisUtterance SpeechSynthesisVoice StaticRange StereoPannerNode Storage StorageEvent StorageManager StylePropertyMap StylePropertyMapReadOnly StyleSheet StyleSheetList SubmitEvent SubtleCrypto SyncManager
|
|
110
|
+
# TaskAttributionTiming TaskController TaskPriorityChangeEvent TaskSignal Text TextDecoder TextEncoder TextDecoderStream TextEncoderStream TextEvent TextFormat TextFormatUpdateEvent TextMetrics TextTrack TextTrackCue TextTrackCueList TextTrackList TimeRanges ToggleEvent Touch TouchEvent TouchList TrackEvent TransformStream TransformStreamDefaultController TransitionEvent TreeWalker TrustedHTML TrustedScript TrustedScriptURL TrustedTypePolicy TrustedTypePolicyFactory UIEvent URL URLPattern URLSearchParams USB USBAlternateInterface USBConfiguration USBConnectionEvent USBDevice USBEndpoint USBInTransferResult USBInterface USBIsochronousInTransferPacket USBIsochronousInTransferResult USBIsochronousOutTransferPacket USBOutTransferResult UserActivation VTTCue VTTRegion ValidityState VideoColorSpace VideoDecoder VideoEncoder VideoFrame VideoPlaybackQuality ViewTransition VirtualKeyboard VisualViewport WakeLock WakeLockSentinel WebAssembly WebGL2RenderingContext WebGLActiveInfo WebGLBuffer WebGLContextEvent WebGLFramebuffer WebGLProgram WebGLQuery WebGLRenderbuffer WebGLRenderingContext WebGLSampler WebGLShader WebGLShaderPrecisionFormat WebGLSync WebGLTexture WebGLTransformFeedback WebGLUniformLocation WebGLVertexArrayObject WebSocket WebSocketStream WebTransport WebTransportBidirectionalStream WebTransportDatagramDuplexStream WebTransportError WheelEvent Window WindowClient WindowControlsOverlay Worker WorkerGlobalScope WorkerLocation WorkerNavigator Worklet WorkletGlobalScope WritableStream WritableStreamDefaultController WritableStreamDefaultWriter XMLDocument XMLHttpRequest XMLHttpRequestEventTarget XMLHttpRequestUpload XMLSerializer XPathEvaluator XPathExpression XPathResult XRAnchor XRAnchorSet XRBoundedReferenceSpace XRCPUDepthInformation XRCamera XRDOMOverlayState XRDepthInformation XRFrame XRHand XRHitTestResult XRHitTestSource XRInputSource XRInputSourceArray XRInputSourceEvent XRInputSourcesChangeEvent XRJointPose XRJointSpace XRLayer XRLightEstimate XRLightProbe XRPose XRRay XRReferenceSpace XRReferenceSpaceEvent XRRenderState XRRigidTransform XRSession XRSessionEvent XRSpace XRSystem XRTransientInputHitTestResult XRTransientInputHitTestSource XRView XRViewerPose XRViewport XRWebGLBinding XRWebGLDepthInformation XRWebGLLayer XSLTProcessor
|
|
111
|
+
# autocomplete-reference: Node.js globals and builtin modules (Node.js API)
|
|
112
|
+
# __dirname __filename exports module require process console Buffer
|
|
113
|
+
# AbortController AbortSignal Blob BroadcastChannel ByteLengthQueuingStrategy CloseEvent CompressionStream CountQueuingStrategy Crypto CryptoKey CustomEvent DecompressionStream DOMException ErrorEvent Event EventSource EventTarget File FormData Headers localStorage MessageChannel MessageEvent MessagePort navigator PerformanceEntry PerformanceMark PerformanceMeasure PerformanceObserver PerformanceObserverEntryList PerformanceResourceTiming performance Request Response sessionStorage Storage structuredClone SubtleCrypto TextDecoder TextDecoderStream TextEncoder TextEncoderStream TransformStream URL URLPattern URLSearchParams WebAssembly WebSocket WritableStream WritableStreamDefaultController WritableStreamDefaultWriter ReadableStream ReadableStreamBYOBReader ReadableStreamBYOBRequest ReadableStreamDefaultController ReadableStreamDefaultReader
|
|
114
|
+
# node assert assert/strict async_hooks buffer child_process cluster console constants crypto dgram diagnostics_channel dns dns/promises domain events fs fs/promises http http2 https inspector inspector/promises module net os path path/posix path/win32 perf_hooks process punycode querystring readline readline/promises repl sea sqlite stream stream/consumers stream/promises stream/web string_decoder test test/reporters timers timers/promises tls trace_events tty url util util/types v8 vm wasi worker_threads zlib
|
|
115
|
+
# autocomplete-reference: Bun globals and Bun native APIs (Bun docs)
|
|
116
|
+
# Bun bun jsc gc CryptoHasher FileSink HTMLBundle Shell ShellError ShellOutput ShellPromise Subprocess Transpiler UnsafeCallback build color console depth dns file gc gzip hash indexOfLine lineColumn listen main mmap nanoseconds openInEditor origin peek readableStreamToArray readableStreamToBlob readableStreamToBytes readableStreamToFormData readableStreamToJSON readableStreamToText resolve resolveSync revision semver serve shell sleep sleepSync spawn spawnSync stderr stdin stdout stringWidth stripANSI udp unzip version which write
|
|
117
|
+
# BunFile S3File ArrayBufferSink BlobPart BodyInit BunPlugin BuildConfig BuildMessage BuildOutput BuildArtifact CompileBuildConfig Cookie CookieMap Env FileBlob FileSystemRouter Glob GlobScanOptions HTTPResponseSink ImportMeta InspectOptions Mock ModuleMock NetworkSink PathLike PluginBuilder Server ServerWebSocket Socket TCPSocketListener TLSOptions TranspilerOptions UDPConnectedSocket UDPSocket WebSocketHandler WebSocketServeOptions
|
|
118
|
+
# fetch Request Response Headers FormData Blob File URL URLSearchParams TextEncoder TextDecoder ReadableStream WritableStream TransformStream WebSocket Event EventTarget MessageEvent CloseEvent ErrorEvent CustomEvent DOMException AbortController AbortSignal crypto Crypto CryptoKey SubtleCrypto performance structuredClone queueMicrotask setTimeout clearTimeout setInterval clearInterval setImmediate clearImmediate
|
|
119
|
+
# bun:test describe test it expect beforeAll beforeEach afterAll afterEach mock spyOn jest setSystemTime restore clearAllMocks restoreAllMocks
|
|
120
|
+
# bun:sqlite Database Statement SQLQueryBindings SQLQueryResult
|
|
121
|
+
# bun:jsc serialize deserialize
|
|
122
|
+
# bun:ffi dlopen suffix ptr CString JSCallback FFIType
|
|
123
|
+
# bun:wrap wrap
|
|
124
|
+
# bun:main bun:internal bun:macro bun:plugin bun:embedded bun:generated
|
|
@@ -60,3 +60,21 @@ rules:
|
|
|
60
60
|
end: "$"
|
|
61
61
|
rules: # AKA Code tags (PEP 350)
|
|
62
62
|
- todo: "(TODO|FIXME|HACK|BUG|NOTE|FAQ|MNEMONIC|REQ|RFE|IDEA|PORT|\\?\\?\\?|!!!|GLOSS|SEE|TODOC|STAT|RVD|CRED):?"
|
|
63
|
+
|
|
64
|
+
# autocomplete-reference: Python built-in constants, functions, and types (Python docs)
|
|
65
|
+
# None True False Ellipsis NotImplemented __debug__ abs aiter all anext any ascii bin bool breakpoint bytearray bytes callable chr classmethod compile complex delattr dict dir divmod enumerate eval exec filter float format frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len list locals map max memoryview min next object oct open ord pow print property range repr reversed round set setattr slice sorted staticmethod str sum super tuple type vars zip __import__
|
|
66
|
+
# ArithmeticError AssertionError AttributeError BaseException BaseExceptionGroup BlockingIOError BrokenPipeError BufferError BytesWarning ChildProcessError ConnectionAbortedError ConnectionError ConnectionRefusedError ConnectionResetError DeprecationWarning EOFError EncodingWarning EnvironmentError Exception ExceptionGroup FileExistsError FileNotFoundError FloatingPointError FutureWarning GeneratorExit IOError ImportError ImportWarning IndentationError IndexError InterruptedError IsADirectoryError KeyError KeyboardInterrupt LookupError MemoryError ModuleNotFoundError NameError NotADirectoryError NotImplementedError OSError OverflowError PendingDeprecationWarning PermissionError ProcessLookupError RecursionError ReferenceError ResourceWarning RuntimeError RuntimeWarning StopAsyncIteration StopIteration SyntaxError SyntaxWarning SystemError SystemExit TabError TimeoutError TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError Warning ZeroDivisionError
|
|
67
|
+
# autocomplete-reference: Python common object and data model methods
|
|
68
|
+
# __abs__ __add__ __aiter__ __all__ __and__ __annotations__ __anext__ __await__ __bases__ __bool__ __buffer__ __builtins__ __bytes__ __cached__ __call__ __ceil__ __class__ __class_getitem__ __closure__ __code__ __complex__ __contains__ __context__ __debug__ __defaults__ __del__ __delattr__ __delete__ __delitem__ __dict__ __dir__ __divmod__ __doc__ __enter__ __eq__ __exit__ __file__ __float__ __floor__ __floordiv__ __format__ __fspath__ __ge__ __get__ __getattr__ __getattribute__ __getitem__ __getnewargs__ __getstate__ __globals__ __gt__ __hash__ __iadd__ __iand__ __ifloordiv__ __ilshift__ __imatmul__ __imod__ __imul__ __index__ __init__ __init_subclass__ __instancecheck__ __int__ __invert__ __ior__ __ipow__ __irshift__ __isub__ __iter__ __itruediv__ __ixor__ __kwdefaults__ __le__ __len__ __length_hint__ __loader__ __lshift__ __lt__ __matmul__ __missing__ __mod__ __module__ __mro__ __mul__ __name__ __ne__ __neg__ __new__ __next__ __or__ __package__ __path__ __pos__ __pow__ __qualname__ __radd__ __rand__ __rdivmod__ __reduce__ __reduce_ex__ __repr__ __reversed__ __rfloordiv__ __rlshift__ __rmatmul__ __rmod__ __rmul__ __ror__ __round__ __rpow__ __rrshift__ __rshift__ __rsub__ __rtruediv__ __rxor__ __set__ __set_name__ __setattr__ __setitem__ __slots__ __spec__ __str__ __sub__ __subclasscheck__ __subclasses__ __traceback__ __truediv__ __trunc__ __weakref__ __xor__
|
|
69
|
+
# autocomplete-reference: Python str, bytes, list, tuple, dict, set, file/path methods
|
|
70
|
+
# capitalize casefold center count encode endswith expandtabs find format format_map index isalnum isalpha isascii isdecimal isdigit isidentifier islower isnumeric isprintable isspace istitle isupper join ljust lower lstrip maketrans partition removeprefix removesuffix replace rfind rindex rjust rpartition rsplit rstrip split splitlines startswith strip swapcase title translate upper zfill
|
|
71
|
+
# append clear copy count extend index insert pop remove reverse sort
|
|
72
|
+
# clear copy fromkeys get items keys pop popitem setdefault update values
|
|
73
|
+
# add clear copy difference difference_update discard intersection intersection_update isdisjoint issubset issuperset pop remove symmetric_difference symmetric_difference_update union update
|
|
74
|
+
# close closed detach fileno flush isatty read readable readline readlines seek seekable tell truncate writable write writelines exists is_file is_dir iterdir glob rglob mkdir rename replace resolve absolute parent parents name stem suffix suffixes with_name with_stem with_suffix open read_text read_bytes write_text write_bytes
|
|
75
|
+
# autocomplete-reference: Python standard-library module names (Python module index)
|
|
76
|
+
# abc aifc argparse array ast asyncio atexit audioop base64 bdb binascii bisect builtins bz2 calendar cgi cgitb chunk cmath cmd code codecs codeop collections colorsys compileall concurrent configparser contextlib contextvars copy copyreg crypt csv ctypes curses dataclasses datetime dbm decimal difflib dis doctest email encodings ensurepip enum errno faulthandler fcntl filecmp fileinput fnmatch fractions ftplib functools gc getopt getpass gettext glob graphlib grp gzip hashlib heapq hmac html http idlelib imaplib imghdr importlib inspect io ipaddress itertools json keyword linecache locale logging lzma mailbox mailcap marshal math mimetypes mmap modulefinder multiprocessing netrc nis nntplib numbers operator optparse os pathlib pdb pickle pickletools pipes pkgutil platform plistlib poplib posix pprint profile pstats pty pwd py_compile pyclbr pydoc queue quopri random re readline reprlib resource rlcompleter runpy sched secrets select selectors shelve shlex shutil signal site smtpd smtplib sndhdr socket socketserver sqlite3 ssl stat statistics string stringprep struct subprocess sunau symtable sys sysconfig syslog tabnanny tarfile telnetlib tempfile termios textwrap threading time timeit tkinter token tokenize tomllib trace traceback tracemalloc tty turtle types typing unicodedata unittest urllib uuid venv warnings wave weakref webbrowser wsgiref xdrlib xml xmlrpc zipapp zipfile zipimport zlib zoneinfo
|
|
77
|
+
# autocomplete-reference: famous third-party Python packages and common aliases
|
|
78
|
+
# numpy np pandas pd scipy sklearn scikit_learn matplotlib plt seaborn sns plotly bokeh altair statsmodels sympy numba cython polars pyarrow dask xarray networkx requests httpx aiohttp urllib3 beautifulsoup4 bs4 lxml scrapy selenium playwright flask django fastapi starlette pydantic sqlalchemy alembic psycopg2 pymongo redis celery typer click rich textual tqdm pytest hypothesis tox nox black ruff flake8 mypy pyright isort poetry pip setuptools wheel virtualenv ipython jupyter notebook jupyterlab ipykernel ipywidgets traitlets pillow PIL opencv cv2 imageio skimage scikit_image torch torchvision torchaudio tensorflow keras jax flax transformers tokenizers datasets accelerate diffusers sentence_transformers spacy nltk gensim langchain openai anthropic google genai boto3 botocore s3fs fsspec cryptography paramiko fabric pendulum arrow dateutil pyyaml yaml toml tomli tomlkit orjson ujson msgpack pydantic_settings python_dotenv dotenv sqlalchemy_utils flask_sqlalchemy django_rest_framework drf pytest_asyncio pytest_cov coverage
|
|
79
|
+
# autocomplete-reference: common package submodules and method words
|
|
80
|
+
# ndarray array arange linspace zeros ones empty full eye reshape transpose astype dtype shape ndim size mean median std var sum min max argmin argmax argsort sort clip concatenate stack hstack vstack dot matmul einsum where unique random DataFrame Series read_csv read_excel read_json read_parquet read_sql to_csv to_excel to_json to_parquet groupby merge join concat pivot pivot_table drop dropna fillna assign apply map iloc loc values columns index describe head tail info query sort_values reset_index set_index fit transform fit_transform predict predict_proba score train_test_split Pipeline GridSearchCV StandardScaler OneHotEncoder RandomForestClassifier RandomForestRegressor LinearRegression LogisticRegression
|