bunmicro 0.8.0

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.
Files changed (237) hide show
  1. package/LICENSE +22 -0
  2. package/PORTING.md +34 -0
  3. package/README.md +153 -0
  4. package/bmi +5 -0
  5. package/bun.lock +17 -0
  6. package/bunmicro +5 -0
  7. package/hlw.md +5 -0
  8. package/package.json +18 -0
  9. package/runtime/colorschemes/atom-dark.micro +33 -0
  10. package/runtime/colorschemes/bubblegum.micro +31 -0
  11. package/runtime/colorschemes/cmc-16.micro +47 -0
  12. package/runtime/colorschemes/cmc-tc.micro +43 -0
  13. package/runtime/colorschemes/darcula.micro +34 -0
  14. package/runtime/colorschemes/default.micro +1 -0
  15. package/runtime/colorschemes/dracula-tc.micro +49 -0
  16. package/runtime/colorschemes/dukedark-tc.micro +38 -0
  17. package/runtime/colorschemes/dukelight-tc.micro +38 -0
  18. package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
  19. package/runtime/colorschemes/geany.micro +29 -0
  20. package/runtime/colorschemes/gotham.micro +29 -0
  21. package/runtime/colorschemes/gruvbox-tc.micro +29 -0
  22. package/runtime/colorschemes/gruvbox.micro +26 -0
  23. package/runtime/colorschemes/material-tc.micro +36 -0
  24. package/runtime/colorschemes/monokai-dark.micro +28 -0
  25. package/runtime/colorschemes/monokai.micro +34 -0
  26. package/runtime/colorschemes/one-dark.micro +39 -0
  27. package/runtime/colorschemes/railscast.micro +37 -0
  28. package/runtime/colorschemes/simple.micro +33 -0
  29. package/runtime/colorschemes/solarized-tc.micro +31 -0
  30. package/runtime/colorschemes/solarized.micro +30 -0
  31. package/runtime/colorschemes/sunny-day.micro +29 -0
  32. package/runtime/colorschemes/twilight.micro +40 -0
  33. package/runtime/colorschemes/zenburn.micro +30 -0
  34. package/runtime/help/actions.md +161 -0
  35. package/runtime/help/colors.md +421 -0
  36. package/runtime/help/commands.md +161 -0
  37. package/runtime/help/copypaste.md +149 -0
  38. package/runtime/help/defaultkeys.md +141 -0
  39. package/runtime/help/help.md +63 -0
  40. package/runtime/help/keybindings.md +760 -0
  41. package/runtime/help/linter.md +90 -0
  42. package/runtime/help/options.md +701 -0
  43. package/runtime/help/plugins.md +544 -0
  44. package/runtime/help/tutorial.md +112 -0
  45. package/runtime/jsplugins/chapter/chapter.js +108 -0
  46. package/runtime/jsplugins/diff/diff.js +46 -0
  47. package/runtime/jsplugins/example/example.js +108 -0
  48. package/runtime/jsplugins/linter/linter.js +281 -0
  49. package/runtime/plugins/autoclose/autoclose.lua +75 -0
  50. package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
  51. package/runtime/plugins/literate/README.md +5 -0
  52. package/runtime/plugins/literate/literate.lua +55 -0
  53. package/runtime/plugins/status/help/status.md +21 -0
  54. package/runtime/plugins/status/status.lua +62 -0
  55. package/runtime/syntax/LICENSE +22 -0
  56. package/runtime/syntax/PowerShell.yaml +128 -0
  57. package/runtime/syntax/README.md +63 -0
  58. package/runtime/syntax/ada.yaml +43 -0
  59. package/runtime/syntax/apacheconf.yaml +59 -0
  60. package/runtime/syntax/arduino.yaml +101 -0
  61. package/runtime/syntax/asciidoc.yaml +51 -0
  62. package/runtime/syntax/asm.yaml +123 -0
  63. package/runtime/syntax/ats.yaml +99 -0
  64. package/runtime/syntax/awk.yaml +44 -0
  65. package/runtime/syntax/b.yaml +87 -0
  66. package/runtime/syntax/bat.yaml +57 -0
  67. package/runtime/syntax/c.yaml +60 -0
  68. package/runtime/syntax/caddyfile.yaml +23 -0
  69. package/runtime/syntax/cake.yaml +7 -0
  70. package/runtime/syntax/clojure.yaml +38 -0
  71. package/runtime/syntax/cmake.yaml +42 -0
  72. package/runtime/syntax/coffeescript.yaml +56 -0
  73. package/runtime/syntax/colortest.yaml +19 -0
  74. package/runtime/syntax/conky.yaml +17 -0
  75. package/runtime/syntax/cpp.yaml +91 -0
  76. package/runtime/syntax/crontab.yaml +36 -0
  77. package/runtime/syntax/crystal.yaml +72 -0
  78. package/runtime/syntax/csharp.yaml +52 -0
  79. package/runtime/syntax/css.yaml +44 -0
  80. package/runtime/syntax/csx.yaml +8 -0
  81. package/runtime/syntax/cuda.yaml +68 -0
  82. package/runtime/syntax/cython.yaml +52 -0
  83. package/runtime/syntax/d.yaml +121 -0
  84. package/runtime/syntax/dart.yaml +46 -0
  85. package/runtime/syntax/default.yaml +10 -0
  86. package/runtime/syntax/dockerfile.yaml +36 -0
  87. package/runtime/syntax/dot.yaml +29 -0
  88. package/runtime/syntax/elixir.yaml +30 -0
  89. package/runtime/syntax/elm.yaml +38 -0
  90. package/runtime/syntax/erb.yaml +42 -0
  91. package/runtime/syntax/erlang.yaml +45 -0
  92. package/runtime/syntax/fish.yaml +48 -0
  93. package/runtime/syntax/forth.yaml +34 -0
  94. package/runtime/syntax/fortran.yaml +64 -0
  95. package/runtime/syntax/freebsd-kernel.yaml +14 -0
  96. package/runtime/syntax/fsharp.yaml +48 -0
  97. package/runtime/syntax/gdscript.yaml +61 -0
  98. package/runtime/syntax/gemini.yaml +19 -0
  99. package/runtime/syntax/gentoo-ebuild.yaml +48 -0
  100. package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
  101. package/runtime/syntax/git-commit.yaml +35 -0
  102. package/runtime/syntax/git-config.yaml +14 -0
  103. package/runtime/syntax/git-rebase-todo.yaml +19 -0
  104. package/runtime/syntax/gleam.yaml +69 -0
  105. package/runtime/syntax/glsl.yaml +26 -0
  106. package/runtime/syntax/gnuplot.yaml +15 -0
  107. package/runtime/syntax/go.yaml +62 -0
  108. package/runtime/syntax/godoc.yaml +17 -0
  109. package/runtime/syntax/golo.yaml +73 -0
  110. package/runtime/syntax/gomod.yaml +31 -0
  111. package/runtime/syntax/graphql.yaml +47 -0
  112. package/runtime/syntax/groff.yaml +30 -0
  113. package/runtime/syntax/groovy.yaml +111 -0
  114. package/runtime/syntax/haml.yaml +16 -0
  115. package/runtime/syntax/hare.yaml +52 -0
  116. package/runtime/syntax/haskell.yaml +52 -0
  117. package/runtime/syntax/hc.yaml +52 -0
  118. package/runtime/syntax/html.yaml +70 -0
  119. package/runtime/syntax/html4.yaml +25 -0
  120. package/runtime/syntax/html5.yaml +25 -0
  121. package/runtime/syntax/ini.yaml +23 -0
  122. package/runtime/syntax/inputrc.yaml +14 -0
  123. package/runtime/syntax/java.yaml +37 -0
  124. package/runtime/syntax/javascript.yaml +76 -0
  125. package/runtime/syntax/jinja2.yaml +19 -0
  126. package/runtime/syntax/json.yaml +39 -0
  127. package/runtime/syntax/jsonnet.yaml +92 -0
  128. package/runtime/syntax/julia.yaml +57 -0
  129. package/runtime/syntax/justfile.yaml +40 -0
  130. package/runtime/syntax/keymap.yaml +27 -0
  131. package/runtime/syntax/kickstart.yaml +16 -0
  132. package/runtime/syntax/kotlin.yaml +66 -0
  133. package/runtime/syntax/kvlang.yaml +67 -0
  134. package/runtime/syntax/ledger.yaml +14 -0
  135. package/runtime/syntax/lfe.yaml +17 -0
  136. package/runtime/syntax/lilypond.yaml +26 -0
  137. package/runtime/syntax/lisp.yaml +17 -0
  138. package/runtime/syntax/log.yaml +92 -0
  139. package/runtime/syntax/lua.yaml +111 -0
  140. package/runtime/syntax/mail.yaml +25 -0
  141. package/runtime/syntax/makefile.yaml +38 -0
  142. package/runtime/syntax/man.yaml +12 -0
  143. package/runtime/syntax/markdown.yaml +49 -0
  144. package/runtime/syntax/mc.yaml +23 -0
  145. package/runtime/syntax/meson.yaml +51 -0
  146. package/runtime/syntax/micro.yaml +34 -0
  147. package/runtime/syntax/mpdconf.yaml +13 -0
  148. package/runtime/syntax/msbuild.yaml +6 -0
  149. package/runtime/syntax/nanorc.yaml +16 -0
  150. package/runtime/syntax/nftables.yaml +30 -0
  151. package/runtime/syntax/nginx.yaml +22 -0
  152. package/runtime/syntax/nim.yaml +27 -0
  153. package/runtime/syntax/nix.yaml +32 -0
  154. package/runtime/syntax/nu.yaml +114 -0
  155. package/runtime/syntax/objc.yaml +60 -0
  156. package/runtime/syntax/ocaml.yaml +43 -0
  157. package/runtime/syntax/octave.yaml +83 -0
  158. package/runtime/syntax/odin.yaml +64 -0
  159. package/runtime/syntax/pascal.yaml +45 -0
  160. package/runtime/syntax/patch.yaml +14 -0
  161. package/runtime/syntax/peg.yaml +16 -0
  162. package/runtime/syntax/perl.yaml +58 -0
  163. package/runtime/syntax/php.yaml +60 -0
  164. package/runtime/syntax/pkg-config.yaml +12 -0
  165. package/runtime/syntax/po.yaml +12 -0
  166. package/runtime/syntax/pony.yaml +37 -0
  167. package/runtime/syntax/pov.yaml +21 -0
  168. package/runtime/syntax/privoxy-action.yaml +14 -0
  169. package/runtime/syntax/privoxy-config.yaml +10 -0
  170. package/runtime/syntax/privoxy-filter.yaml +12 -0
  171. package/runtime/syntax/proto.yaml +40 -0
  172. package/runtime/syntax/prql.yaml +84 -0
  173. package/runtime/syntax/puppet.yaml +22 -0
  174. package/runtime/syntax/python2.yaml +60 -0
  175. package/runtime/syntax/python3.yaml +62 -0
  176. package/runtime/syntax/r.yaml +32 -0
  177. package/runtime/syntax/raku.yaml +42 -0
  178. package/runtime/syntax/reST.yaml +18 -0
  179. package/runtime/syntax/renpy.yaml +15 -0
  180. package/runtime/syntax/rpmspec.yaml +43 -0
  181. package/runtime/syntax/ruby.yaml +73 -0
  182. package/runtime/syntax/rust.yaml +78 -0
  183. package/runtime/syntax/sage.yaml +60 -0
  184. package/runtime/syntax/scad.yaml +53 -0
  185. package/runtime/syntax/scala.yaml +33 -0
  186. package/runtime/syntax/sed.yaml +13 -0
  187. package/runtime/syntax/sh.yaml +69 -0
  188. package/runtime/syntax/sls.yaml +15 -0
  189. package/runtime/syntax/smalltalk.yaml +55 -0
  190. package/runtime/syntax/solidity.yaml +41 -0
  191. package/runtime/syntax/sql.yaml +35 -0
  192. package/runtime/syntax/stata.yaml +67 -0
  193. package/runtime/syntax/svelte.yaml +27 -0
  194. package/runtime/syntax/swift.yaml +103 -0
  195. package/runtime/syntax/systemd.yaml +16 -0
  196. package/runtime/syntax/tcl.yaml +18 -0
  197. package/runtime/syntax/terraform.yaml +87 -0
  198. package/runtime/syntax/tex.yaml +32 -0
  199. package/runtime/syntax/toml.yaml +56 -0
  200. package/runtime/syntax/twig.yaml +55 -0
  201. package/runtime/syntax/typescript.yaml +49 -0
  202. package/runtime/syntax/v.yaml +80 -0
  203. package/runtime/syntax/vala.yaml +26 -0
  204. package/runtime/syntax/verilog.yaml +60 -0
  205. package/runtime/syntax/vhdl.yaml +37 -0
  206. package/runtime/syntax/vi.yaml +31 -0
  207. package/runtime/syntax/vue.yaml +64 -0
  208. package/runtime/syntax/xml.yaml +37 -0
  209. package/runtime/syntax/xresources.yaml +14 -0
  210. package/runtime/syntax/yaml.yaml +34 -0
  211. package/runtime/syntax/yum.yaml +12 -0
  212. package/runtime/syntax/zig.yaml +52 -0
  213. package/runtime/syntax/zscript.yaml +72 -0
  214. package/runtime/syntax/zsh.yaml +52 -0
  215. package/src/buffer/buffer.js +126 -0
  216. package/src/buffer/loc.js +38 -0
  217. package/src/buffer/message.js +29 -0
  218. package/src/config/colorscheme.js +109 -0
  219. package/src/config/config.js +118 -0
  220. package/src/config/defaults.js +102 -0
  221. package/src/display/ansi-style.js +60 -0
  222. package/src/highlight/highlighter.js +237 -0
  223. package/src/highlight/parser.js +137 -0
  224. package/src/index.js +5942 -0
  225. package/src/lua/engine.js +38 -0
  226. package/src/platform/archive.js +50 -0
  227. package/src/platform/clipboard.js +160 -0
  228. package/src/platform/commands.js +140 -0
  229. package/src/plugins/js-bridge.js +902 -0
  230. package/src/plugins/manager.js +619 -0
  231. package/src/runtime/registry.js +89 -0
  232. package/src/screen/cell-buffer.js +81 -0
  233. package/src/screen/events.js +263 -0
  234. package/src/screen/screen.js +118 -0
  235. package/src/screen/vt100.js +391 -0
  236. package/src/shell/shell.js +70 -0
  237. package/todo.txt +359 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016-2020: Zachary Yedidia, et al.
4
+ Copyright (c) 2026 Dr. John
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/PORTING.md ADDED
@@ -0,0 +1,34 @@
1
+ # Porting Plan
2
+
3
+ ## Dependency Policy
4
+
5
+ - Prefer Bun built-ins and Web/Node-compatible built-ins.
6
+ - Lua may use a pure JavaScript or WebAssembly package.
7
+ - Avoid native bindings: no `.node`, N-API, node-gyp, curses/notcurses bindings.
8
+ - Platform integration should use commands that already exist on the system.
9
+
10
+ ## Platform Policies
11
+
12
+ ### Zip Extraction
13
+
14
+ - macOS: use built-in `tar` / bsdtar.
15
+ - Windows: use built-in `tar.exe` / bsdtar.
16
+ - Linux and Android: use `unzip` if present; otherwise show an install message.
17
+
18
+ ### Clipboard
19
+
20
+ - Android: try `termux-clipboard-set` and `termux-clipboard-get` first, then Linux-style tools.
21
+ - Linux: try `wl-copy` / `wl-paste`, then `xclip`, then `xsel`; do not use Termux commands when `process.platform` reports Linux.
22
+ - macOS: use `pbcopy` / `pbpaste`.
23
+ - Windows: use PowerShell `Set-Clipboard` / `Get-Clipboard -Raw`.
24
+ - If no external backend is available, use internal registers only.
25
+
26
+ ## Lua
27
+
28
+ Runtime is `wasmoon` only because it is WebAssembly, not native binding, and keeps the project to one Lua VM. It needs a micro-specific interop layer that exposes `import("micro")`, `import("micro/buffer")`, `import("micro/config")`, and related APIs.
29
+
30
+ ## Terminal Screen
31
+
32
+ There is no direct tcell equivalent in Bun without native bindings. The port
33
+ should implement a local screen abstraction over raw stdin/stdout, ANSI escape
34
+ sequences, bracketed paste, mouse tracking, and a cell diff renderer.
package/README.md ADDED
@@ -0,0 +1,153 @@
1
+ # Introduction
2
+ - bunmicro is a Bun JavaScript rewrite of the micro editor originally in Golang
3
+ - This project is not affiliated with Bun / Micro
4
+ - .
5
+ - Original project:
6
+ - https://github.com/micro-editor/micro
7
+ - .
8
+ - Mostly written by Claude or Codex
9
+ - But also some handwritten code
10
+
11
+ # Unique features
12
+ ## Load URLs directly
13
+ - bunmicro <url>
14
+ - or inside the editor Ctrl-E open <url>
15
+ ## Long line protection
16
+ - In the original micro, if you open a minified file like vue.min.js it will be very slow due to re-highlighting
17
+ - In this Bun version, if line > 300 characters, re-highlighting is paused until ESC is pressed
18
+ ## Text-To-Speech
19
+ - Ctrl-E tts: Start reading from the current position
20
+ - Ctrl-E ttsspeed 2
21
+ - Ctrl-E ttspitch 1.1
22
+ ## Easy selection
23
+ - Mouse click on line numbers to select a range of lines
24
+ - Useful without a mouse on Android
25
+ - Also available: Ctrl-E act SelectRight
26
+ ## js plugin
27
+ - Instead of writing Lua, use your familiar JavaScript to extend functionalities
28
+ - runtime/jsplugins/<name>/<name>.js
29
+ ## Output highlighted text to terminal
30
+ - Works like bat ccat glow
31
+ - bunmicro -bat file
32
+ - aliases: --cat --bat --ccat --glow
33
+ ## Preview color schemes(theme)
34
+ - Ctrl-E theme, then press Tab and use arrow keys to preview
35
+ ## Mouse clicks more useful
36
+ - Almost every component on the screen is clickable or double clickable
37
+ - A complete help is at the end
38
+ ## Auto-completions arrow keys
39
+ - Press Tab and use arrow keys to select items
40
+ ## Version shows backends
41
+ - bunmicro --version shows http/clipboard/tts backends
42
+
43
+ # Installation and basic usage
44
+
45
+ ## Option 1: Use npm
46
+ ### 1. Install npm
47
+ - Android(Termux): pkg i npm
48
+ * As of 2026/06/01
49
+ * npm is the only way for automatically installing Bun for Android(Termux)
50
+ * bunx is broken on Android
51
+ - Windows: .msi, macOS: .pkg
52
+ * https://nodejs.org
53
+ - Linux: one of
54
+ * sudo apt install npm
55
+ * sudo apk add npm
56
+ * sudo pacman -S npm
57
+ * or use whatever package manager your OS provides
58
+
59
+ ### 2. Install bunmicro
60
+
61
+ ```sh
62
+ # Install Bun
63
+ npm i -g bun
64
+
65
+ # Run bunmicro(stable)
66
+ npx bunmicro
67
+ # npx bunmicro [options] [file1] [file2] ...
68
+ # alternative: bun bunmicro/src/index.js [options] [file1] [file2] ...
69
+ # if npx is not available, use npm x -- bunmicro
70
+
71
+ # Run bunmicro(shorter command, less stable)
72
+ # npm i -g bunmicro
73
+ # bunmicro
74
+ ```
75
+
76
+ ## Option 2: Use Bun
77
+ - Android(Termux): Use npm
78
+ - You can install Bun at:
79
+ - https://bun.com
80
+
81
+ ```sh
82
+ bun x bunmicro
83
+ # bun x bunmicro [options] [file1] [file2] ...
84
+ # alternative: bun bunmicro/src/index.js [options] [file1] [file2] ...
85
+ ```
86
+
87
+ # Basic features
88
+ - Inherited from the original Golang micro
89
+ - Only features listed here are implemented
90
+ * There may be some differences from the original micro. Let me know if it's an obvious bug.
91
+ * Send me an email directly:
92
+ * jjtseng93@gmail.com
93
+ - .
94
+ - Easy to use: No mode switching. Just start typing.
95
+ - Familiar key bindings (Ctrl-s=Save, Ctrl-c=Copy, etc)
96
+ - Panes(Splits) & Tabs (multitasking)
97
+ - nano-like key bindings menu by Alt-g or mouse click
98
+ - Extremely good mouse support
99
+ - Cross-platform: Copy the same bunmicro folder and run anywhere with Bun present
100
+ - Plugin system
101
+ * From the original micro: written in Lua
102
+ * From bunmicro: jsplugins in Bun JavaScript
103
+ * runtime/plugins runtime/jsplugins
104
+ - diff gutter: diff color shown at the line numbers column
105
+ - autocompletion by pressing Tab
106
+ - Auto linting on save or command(lint) if tools are installed
107
+ - Syntax highlighting for over 130 languages
108
+ - Color scheme support (theme)
109
+ - Copy and paste with the system clipboard
110
+ - Small and simple (around 3MB)
111
+ - Common editor features such as undo/redo, line numbers, Unicode support, soft wrapping, etc
112
+
113
+ # Useful key bindings:
114
+
115
+ - `Ctrl-Q`: Close current tab/pane, quits if it is the last tab/pane; prompts if modified
116
+ - `Ctrl-S`: Save
117
+ - `Ctrl-O`: Open
118
+ - `Ctrl-G`: Toggle help pane
119
+ - `Ctrl-E`: Command prompt
120
+ - `Ctrl-K`: Cut current line to detected clipboard backend
121
+ - `Ctrl-F`: Find
122
+ - `Ctrl-Z`: Undo
123
+ - `Ctrl-Y`: Redo
124
+ - `Ctrl-A`: Select All
125
+ - `Ctrl-B`: Shell prompt
126
+ - `Ctrl-D`: Duplicate Line/Selection
127
+ - `Ctrl-T`: Open a new tab
128
+ - `Alt-G`: Toggle nano-like key bindings menu
129
+ - `Alt-,` / `Alt-p`: Previous tab
130
+ - `Alt-.` / `Alt-t`: Next tab
131
+ - `Tab`: Triggers autocomplete
132
+ - `Esc`: close command/shell prompt or terminal pane, rehighlight long lines
133
+
134
+ # Mouse click actions
135
+ - Top Tabs:
136
+ * Click: switch tabs
137
+ * Double click: show complete file path
138
+ - Line numbers(gutter):
139
+ * Click: select lines
140
+ * Double click: toggle comment
141
+ * also click on linter symbols to show the problem
142
+ - Filename: Switch tabs or show complete file path
143
+ - (row,col)
144
+ * row to goto line
145
+ * col to jump cursor between paired ()[]{} or Home/End
146
+ - Multi-window icon: new tab
147
+ - File type: switch highlighting languages
148
+ - Euro: Command prompt
149
+ - Unix/dos: toggle newline chars LF/CRLF
150
+ - Dollar: Shell prompt
151
+ - Encoding: Reopen with a specific encoding.
152
+ * Show supported encodings by bunmicro --version
153
+ - Alt-G: Show nano-like key bindings menu
package/bmi ADDED
@@ -0,0 +1,5 @@
1
+ #!/bin/sh
2
+
3
+ sd=$(dirname "$(realpath "$0")")
4
+
5
+ exec bun "$sd"/src/index.js "$@"
package/bun.lock ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "lockfileVersion": 1,
3
+ "configVersion": 1,
4
+ "workspaces": {
5
+ "": {
6
+ "name": "bunmicro",
7
+ "dependencies": {
8
+ "wasmoon": "^1.16.0",
9
+ },
10
+ },
11
+ },
12
+ "packages": {
13
+ "@types/emscripten": ["@types/emscripten@1.39.10", "", {}, "sha512-TB/6hBkYQJxsZHSqyeuO1Jt0AB/bW6G7rHt9g7lML7SOF6lbgcHvw/Lr+69iqN0qxgXLhWKScAon73JNnptuDw=="],
14
+
15
+ "wasmoon": ["wasmoon@1.16.0", "", { "dependencies": { "@types/emscripten": "1.39.10" }, "bin": { "wasmoon": "bin/wasmoon" } }, "sha512-FlRLb15WwAOz1A9OQDbf6oOKKSiefi5VK0ZRF2wgH9xk3o5SnU11tNPaOnQuAh1Ucr66cwwvVXaeVRaFdRBt5g=="],
16
+ }
17
+ }
package/bunmicro ADDED
@@ -0,0 +1,5 @@
1
+ #!/bin/sh
2
+
3
+ sd=$(dirname "$(realpath "$0")")
4
+
5
+ exec bun "$sd"/src/index.js "$@"
package/hlw.md ADDED
@@ -0,0 +1,5 @@
1
+ # hello
2
+ - world
3
+ - 你好 世界 😅
4
+ - Bun JavaScript
5
+ - [example](https://example.com)
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "bunmicro",
3
+ "version": "0.8.0",
4
+ "description": "Bun JavaScript rewrite of the micro editor originally in Golang",
5
+ "type": "module",
6
+ "main": "./src/index.js",
7
+ "license": "MIT",
8
+ "bin": {
9
+ "bunmicro": "./src/index.js"
10
+ },
11
+ "scripts": {
12
+ "start": "bun ./src/index.js",
13
+ "check": "node --check ./src/index.js"
14
+ },
15
+ "dependencies": {
16
+ "wasmoon": "^1.16.0"
17
+ }
18
+ }
@@ -0,0 +1,33 @@
1
+ color-link default "#C5C8C6,#1D1F21"
2
+ color-link comment "#7C7C7C,#1D1F21"
3
+ color-link identifier "#F9EE98,#1D1F21"
4
+ color-link constant "#FF73FD,#1D1F21"
5
+ color-link constant.string "#A8FF60,#1D1F21"
6
+ color-link statement "#96CBFE,#1D1F21"
7
+ color-link symbol "#96CBFE,#1D1F21"
8
+ color-link preproc "#62B1FE,#1D1F21"
9
+ color-link type "#C6C5FE,#1D1F21"
10
+ color-link special "#A6E22E,#1D1F21"
11
+ color-link underlined "#D33682,#1D1F21"
12
+ color-link error "bold #FF4444,#1D1F21"
13
+ color-link todo "bold #FF8844,#1D1F21"
14
+ color-link hlsearch "#000000,#B4EC85"
15
+ color-link statusline "#1D1F21,#C5C8C6"
16
+ color-link tabbar "#1D1F21,#C5C8C6"
17
+ color-link indent-char "#505050,#1D1F21"
18
+ color-link line-number "#656866,#232526"
19
+ color-link current-line-number "#656866,#1D1F21"
20
+ color-link diff-added "#00AF00"
21
+ color-link diff-modified "#FFAF00"
22
+ color-link diff-deleted "#D70000"
23
+ color-link gutter-error "#FF4444,#1D1F21"
24
+ color-link gutter-warning "#EEEE77,#1D1F21"
25
+ color-link cursor-line "#2D2F31"
26
+ color-link color-column "#2D2F31"
27
+ #color-link symbol.brackets "#96CBFE,#1D1F21"
28
+ #No extended types (bool in C, etc.)
29
+ #color-link type.extended "default"
30
+ #Plain brackets
31
+ color-link match-brace "#1D1F21,#62B1FE"
32
+ color-link tab-error "#D75F5F"
33
+ color-link trailingws "#D75F5F"
@@ -0,0 +1,31 @@
1
+ color-link default "241,231"
2
+ color-link comment "246,231"
3
+ color-link constant "130,231"
4
+ color-link constant.string "136,231"
5
+ color-link constant.number "131,231"
6
+ color-link identifier "133,231"
7
+ color-link statement "32,231"
8
+ color-link symbol "32,231"
9
+ color-link preproc "28,231"
10
+ color-link type "61,231"
11
+ color-link special "167,231"
12
+ color-link error "231, 160"
13
+ color-link underlined "underline 241,231"
14
+ color-link todo "246,231"
15
+ color-link hlsearch "231,136"
16
+ color-link statusline "241,254"
17
+ color-link tabbar "241,254"
18
+ color-link diff-added "34"
19
+ color-link diff-modified "214"
20
+ color-link diff-deleted "160"
21
+ color-link gutter-error "197,231"
22
+ color-link gutter-warning "134,231"
23
+ color-link line-number "246,254"
24
+ color-link cursor-line "254"
25
+ color-link color-column "254"
26
+ #No extended types (bool in C, &c.) and plain brackets
27
+ color-link type.extended "241,231"
28
+ color-link symbol.brackets "241,231"
29
+ color-link match-brace "231,28"
30
+ color-link tab-error "210"
31
+ color-link trailingws "210"
@@ -0,0 +1,47 @@
1
+ #CaptainMcClellan's personal color scheme.
2
+ #16 colour version.
3
+ color-link comment "bold black"
4
+ color-link constant "cyan"
5
+ color-link constant.bool "bold cyan"
6
+ color-link constant.bool.true "bold green"
7
+ color-link constant.bool.false "bold red"
8
+ color-link constant.string "yellow"
9
+ color-link constant.string.url "underline blue, white"
10
+ #color-link constant.number "constant"
11
+ color-link constant.specialChar "bold magenta"
12
+ color-link identifier "bold red"
13
+ color-link identifier.macro "bold red"
14
+ color-link identifier.var "bold blue"
15
+ #color-link identifier.class "bold green"
16
+ color-link identifier.class "bold white"
17
+ color-link statement "bold yellow"
18
+ color-link symbol "red"
19
+ color-link symbol.brackets "blue"
20
+ color-link symbol.tag "bold blue"
21
+ color-link symbol.tag.extended "bold green"
22
+ color-link preproc "bold cyan"
23
+ color-link type "green"
24
+ color-link type.keyword "bold green"
25
+ color-link special "magenta"
26
+ color-link ignore "default"
27
+ color-link error "bold ,brightred"
28
+ color-link todo "underline black,brightyellow"
29
+ color-link hlsearch "white,darkgreen"
30
+ color-link indent-char ",brightgreen"
31
+ color-link line-number "green"
32
+ color-link line-number.scrollbar "green"
33
+ color-link statusline "white,blue"
34
+ color-link tabbar "white,blue"
35
+ color-link current-line-number "red"
36
+ color-link current-line-number.scroller "red"
37
+ color-link diff-added "green"
38
+ color-link diff-modified "yellow"
39
+ color-link diff-deleted "red"
40
+ color-link gutter-error ",red"
41
+ color-link gutter-warning "red"
42
+ color-link color-column "cyan"
43
+ color-link underlined.url "underline blue, white"
44
+ color-link divider "blue"
45
+ color-link match-brace "black,cyan"
46
+ color-link tab-error "brightred"
47
+ color-link trailingws "brightred"
@@ -0,0 +1,43 @@
1
+ #CaptainMcClellan's personal colour scheme.
2
+ #Full colour edition.
3
+ color-link default "#aaaaaa,#1e2124"
4
+ color-link comment "bold #555555"
5
+ color-link constant "#008888"
6
+ #color-link constant.string "#888800"
7
+ color-link constant.string "#a85700"
8
+ color-link constant.specialChar "bold #ccccff"
9
+ color-link identifier "bold #e34234"
10
+ color-link identifier.macro "bold #e34234"
11
+ color-link identifier.var "bold #5757ff"
12
+ color-link identifier.class "bold #ffffff"
13
+ color-link statement "bold #ffff55"
14
+ color-link symbol "#722f37"
15
+ color-link symbol.brackets "#4169e1"
16
+ color-link symbol.tag "#5757ff"
17
+ color-link preproc "bold #55ffff"
18
+ color-link type "#3eb489"
19
+ color-link type.keyword "bold #bdecb6"
20
+ color-link special "#b57edc"
21
+ color-link ignore "default"
22
+ color-link error "bold ,#e34234"
23
+ color-link todo "bold underline #888888,#f26522"
24
+ color-link hlsearch "#b7b7b7,#32593d"
25
+ color-link indent-char ",#bdecb6"
26
+ color-link line-number "#bdecb6,#36393e"
27
+ color-link line-number.scrollbar "#3eb489"
28
+ color-link statusline "#aaaaaa,#8a496b"
29
+ color-link tabbar "#aaaaaa,#8a496b"
30
+ color-link current-line-number "bold #e34234,#424549"
31
+ color-link current-line-number.scroller "red"
32
+ color-link diff-added "#00AF00"
33
+ color-link diff-modified "#FFAF00"
34
+ color-link diff-deleted "#D70000"
35
+ color-link gutter-error ",#e34234"
36
+ color-link gutter-warning "#e34234"
37
+ color-link color-column "#f26522"
38
+ color-link constant.bool "bold #55ffff"
39
+ color-link constant.bool.true "bold #85ff85"
40
+ color-link constant.bool.false "bold #ff8585"
41
+ color-link match-brace "#1e2124,#55ffff"
42
+ color-link tab-error "#d75f5f"
43
+ color-link trailingws "#d75f5f"
@@ -0,0 +1,34 @@
1
+ color-link default "#CCCCCC,#242424"
2
+ color-link comment "#707070,#242424"
3
+ color-link identifier "#FFC66D,#242424"
4
+ color-link constant "#7A9EC2,#242424"
5
+ color-link constant.string "#6A8759,#242424"
6
+ color-link constant.string.char "#6A8759,#242424"
7
+ color-link statement "#CC8242,#242424"
8
+ color-link symbol "#CCCCCC,#242424"
9
+ color-link preproc "#CC8242,#242424"
10
+ color-link type "#CC8242,#242424"
11
+ color-link special "#CC8242,#242424"
12
+ color-link underlined "#D33682,#242424"
13
+ color-link error "bold #CB4B16,#242424"
14
+ color-link todo "bold #D33682,#242424"
15
+ color-link hlsearch "#CCCCCC,#32593D"
16
+ color-link statusline "#242424,#CCCCCC"
17
+ color-link tabbar "#242424,#CCCCCC"
18
+ color-link indent-char "#4F4F4F,#242424"
19
+ color-link line-number "#666666,#2C2C2C"
20
+ color-link current-line-number "#666666,#242424"
21
+ color-link diff-added "#00AF00"
22
+ color-link diff-modified "#FFAF00"
23
+ color-link diff-deleted "#D70000"
24
+ color-link gutter-error "#CB4B16,#242424"
25
+ color-link gutter-warning "#E6DB74,#242424"
26
+ color-link cursor-line "#2C2C2C"
27
+ color-link color-column "#2C2C2C"
28
+ #No extended types; Plain brackets.
29
+ color-link type.extended "default"
30
+ #color-link symbol.brackets "default"
31
+ color-link symbol.tag "#AE81FF,#242424"
32
+ color-link match-brace "#242424,#7A9EC2"
33
+ color-link tab-error "#D75F5F"
34
+ color-link trailingws "#D75F5F"
@@ -0,0 +1 @@
1
+ include "monokai"
@@ -0,0 +1,49 @@
1
+ color-link default "#F8F8F2,#282A36"
2
+ color-link comment "#6272A4"
3
+
4
+ color-link identifier "#50FA7B"
5
+ color-link identifier.class "#8BE9FD"
6
+ color-link identifier.var "#F8F8F2"
7
+
8
+ color-link constant "#BD93F9"
9
+ color-link constant.number "#F8F8F2"
10
+ color-link constant.string "#F1FA8C"
11
+
12
+ color-link symbol "#FF79C6"
13
+ color-link symbol.brackets "#F8F8F2"
14
+ color-link symbol.tag "#AE81FF"
15
+
16
+ color-link type "italic #8BE9FD"
17
+ color-link type.keyword "#FF79C6"
18
+
19
+ color-link special "#FF79C6"
20
+ color-link statement "#FF79C6"
21
+ color-link preproc "#FF79C6"
22
+
23
+ color-link underlined "#FF79C6"
24
+ color-link error "bold #FF5555"
25
+ color-link todo "bold #FF79C6"
26
+
27
+ color-link hlsearch "#282A36,#50FA7B"
28
+
29
+ color-link diff-added "#50FA7B"
30
+ color-link diff-modified "#FFB86C"
31
+ color-link diff-deleted "#FF5555"
32
+
33
+ color-link gutter-error "#FF5555"
34
+ color-link gutter-warning "#E6DB74"
35
+
36
+ color-link statusline "#282A36,#F8F8F2"
37
+ color-link tabbar "#282A36,#F8F8F2"
38
+ color-link indent-char "#6272A4"
39
+ color-link line-number "#6272A4"
40
+ color-link current-line-number "#F8F8F2"
41
+
42
+ color-link cursor-line "#44475A,#F8F8F2"
43
+ color-link color-column "#44475A"
44
+ color-link type.extended "default"
45
+
46
+ color-link match-brace "#282A36,#FF79C6"
47
+
48
+ color-link tab-error "#D75F5F"
49
+ color-link trailingws "#D75F5F"
@@ -0,0 +1,38 @@
1
+ color-link color-column "#001e28"
2
+ color-link comment "#608b4e,#001e28"
3
+ color-link constant.bool "#fd971f,#001e28"
4
+ color-link constant "#fd971f,#001e28"
5
+ color-link constant.string "#a0f000,#001e28"
6
+ color-link constant.string.char "#a0f000,#001e28"
7
+ color-link constant.string.url "#a0f000,#001e28"
8
+ color-link current-line-number "bold #fd971f,#001e28"
9
+ color-link cursor-line "#001923"
10
+ color-link default "#ffffff,#001e28"
11
+ color-link diff-added "#00c8a0,#001e28"
12
+ color-link diff-modified "#fd971f,#001e28"
13
+ color-link diff-deleted "#cb4b16,#001e28"
14
+ color-link divider "#001e28,#d0d0d0"
15
+ color-link error "#cb4b16,#001e28"
16
+ color-link gutter-error "#cb4b16,#001e28"
17
+ color-link gutter-warning "#fce94f,#001e28"
18
+ color-link hlsearch "#ffffff,#005028"
19
+ color-link identifier "#00c8a0,#001e28"
20
+ color-link identifier.class "#00c8a0,#001e28"
21
+ color-link indent-char "#a0a0a0,#001e28"
22
+ color-link line-number "#a0a0a0,#001923"
23
+ color-link preproc "bold #5aaae6,#001e28"
24
+ color-link special "#a6e22e,#001e28"
25
+ color-link statement "bold #5aaae6,#001e28"
26
+ color-link statusline "#ffffff,#0078c8"
27
+ color-link symbol "#00c8a0,#001e28"
28
+ color-link symbol.brackets "#ffffff,#001e28"
29
+ color-link symbol.tag "bold #5aaae6,#001e28"
30
+ color-link tabbar "#001e28,#ffffff"
31
+ color-link todo "#fce94f,#001e28"
32
+ color-link type "bold #3cc83c,#001e28"
33
+ color-link type.keyword "bold #5aaae6,#001e28"
34
+ color-link type.extended "#ffffff,#001e28"
35
+ color-link underlined "#608b4e,#001e28"
36
+ color-link match-brace "#001e28,#5aaae6"
37
+ color-link tab-error "#d75f5f"
38
+ color-link trailingws "#d75f5f"
@@ -0,0 +1,38 @@
1
+ color-link color-column "#f0f0f0"
2
+ color-link comment "#3f7f5f,#f0f0f0"
3
+ color-link constant.bool "#641e00,#f0f0f0"
4
+ color-link constant "#641e00,#f0f0f0"
5
+ color-link constant.string "#0000ff,#f0f0f0"
6
+ color-link constant.string.char "#0000ff,#f0f0f0"
7
+ color-link constant.string.url "#0000ff,#f0f0f0"
8
+ color-link current-line-number "bold #004080,#f0f0f0"
9
+ color-link cursor-line "#e6e6e6"
10
+ color-link default "#000000,#f0f0f0"
11
+ color-link diff-added "#008040,#f0f0f0"
12
+ color-link diff-modified "#641e00,#f0f0f0"
13
+ color-link diff-deleted "#500000,#f0f0f0"
14
+ color-link divider "#f0f0f0,#004080"
15
+ color-link error "#500000,#f0f0f0"
16
+ color-link gutter-error "#500000,#f0f0f0"
17
+ color-link gutter-warning "#dcc800,#f0f0f0"
18
+ color-link hlsearch "#000000,#b8d8e8"
19
+ color-link identifier "bold #0078a0,#f0f0f0"
20
+ color-link identifier.class "bold #0078a0,#f0f0f0"
21
+ color-link indent-char "#404040,#f0f0f0"
22
+ color-link line-number "#404040,#e6e6e6"
23
+ color-link preproc "bold #780050,#f0f0f0"
24
+ color-link special "bold #0078a0,#f0f0f0"
25
+ color-link statement "bold #780050,#f0f0f0"
26
+ color-link statusline "#ffffff,#0078c8"
27
+ color-link symbol "bold #0078a0,#f0f0f0"
28
+ color-link symbol.brackets "#000000,#f0f0f0"
29
+ color-link symbol.tag "bold #780050,#f0f0f0"
30
+ color-link tabbar "#f0f0f0,#004080"
31
+ color-link todo "#dcc800,#f0f0f0"
32
+ color-link type "bold #004080,#f0f0f0"
33
+ color-link type.keyword "bold #780050,#f0f0f0"
34
+ color-link type.extended "#000000,#f0f0f0"
35
+ color-link underlined "#3f7f5f,#f0f0f0"
36
+ color-link match-brace "#f0f0f0,#780050"
37
+ color-link tab-error "#ff8787"
38
+ color-link trailingws "#ff8787"
@@ -0,0 +1,38 @@
1
+ color-link color-column "#2d0023"
2
+ color-link comment "#886484,#2d0023"
3
+ color-link constant.bool "#fd971f,#2d0023"
4
+ color-link constant "#fd971f,#2d0023"
5
+ color-link constant.string "#a0f000,#2d0023"
6
+ color-link constant.string.char "#a0f000,#2d0023"
7
+ color-link constant.string.url "#a0f000,#2d0023"
8
+ color-link current-line-number "bold #fd971f,#2d0023"
9
+ color-link cursor-line "#230019"
10
+ color-link default "#ffffff,#2d0023"
11
+ color-link diff-added "#00c8a0,#2d0023"
12
+ color-link diff-modified "#fd971f,#2d0023"
13
+ color-link diff-deleted "#cb4b16,#2d0023"
14
+ color-link divider "#2d0023,#d0d0d0"
15
+ color-link error "#cb4b16,#2d0023"
16
+ color-link gutter-error "#cb4b16,#2d0023"
17
+ color-link gutter-warning "#fce94f,#2d0023"
18
+ color-link hlsearch "#ffffff,#005028"
19
+ color-link identifier "#00c8a0,#2d0023"
20
+ color-link identifier.class "#00c8a0,#2d0023"
21
+ color-link indent-char "#a0a0a0,#2d0023"
22
+ color-link line-number "#a0a0a0,#230019"
23
+ color-link preproc "bold #5aaae6,#2d0023"
24
+ color-link special "#a6e22e,#2d0023"
25
+ color-link statement "bold #5aaae6,#2d0023"
26
+ color-link statusline "#ffffff,#0078c8"
27
+ color-link symbol "#00c8a0,#2d0023"
28
+ color-link symbol.brackets "#ffffff,#2d0023"
29
+ color-link symbol.tag "bold #5aaae6,#2d0023"
30
+ color-link tabbar "#2d0023,#ffffff"
31
+ color-link todo "#fce94f,#2d0023"
32
+ color-link type "bold #3cc83c,#2d0023"
33
+ color-link type.keyword "bold #5aaae6,#2d0023"
34
+ color-link type.extended "#ffffff,#2d0023"
35
+ color-link underlined "#886484,#2d0023"
36
+ color-link match-brace "#2d0023,#5aaae6"
37
+ color-link tab-error "#d75f5f"
38
+ color-link trailingws "#d75f5f"
@@ -0,0 +1,29 @@
1
+ #Geany
2
+ color-link comment "red"
3
+ color-link constant "default"
4
+ color-link constant.string "bold yellow"
5
+ color-link identifier "default"
6
+ color-link preproc "cyan"
7
+ color-link special "blue"
8
+ color-link statement "blue"
9
+ color-link symbol "default"
10
+ color-link symbol.tag "bold blue"
11
+ color-link type "blue"
12
+ color-link type.extended "default"
13
+ color-link error "red"
14
+ color-link todo "bold cyan"
15
+ color-link hlsearch "black,brightcyan"
16
+ color-link indent-char "bold black"
17
+ color-link line-number ""
18
+ color-link current-line-number ""
19
+ color-link statusline "black,white"
20
+ color-link tabbar "black,white"
21
+ color-link color-column "bold geren"
22
+ color-link diff-added "green"
23
+ color-link diff-modified "yellow"
24
+ color-link diff-deleted "red"
25
+ color-link gutter-error ",red"
26
+ color-link gutter-warning "red"
27
+ color-link match-brace "black,cyan"
28
+ color-link tab-error "brightred"
29
+ color-link trailingws "brightred"