jsmdcui 0.3.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.
- package/CHANGELOG.md +76 -0
- package/LICENSE +22 -0
- package/README.md +285 -0
- package/package.json +17 -0
- package/project_structure.txt +35 -0
- package/runmd.mjs +240 -0
- package/runtime/colorschemes/atom-dark.micro +33 -0
- package/runtime/colorschemes/bubblegum.micro +31 -0
- package/runtime/colorschemes/cmc-16.micro +47 -0
- package/runtime/colorschemes/cmc-tc.micro +43 -0
- package/runtime/colorschemes/darcula.micro +34 -0
- package/runtime/colorschemes/default.micro +1 -0
- package/runtime/colorschemes/dracula-tc.micro +49 -0
- package/runtime/colorschemes/dukedark-tc.micro +38 -0
- package/runtime/colorschemes/dukelight-tc.micro +38 -0
- package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
- package/runtime/colorschemes/geany.micro +29 -0
- package/runtime/colorschemes/gotham.micro +29 -0
- package/runtime/colorschemes/gruvbox-tc.micro +29 -0
- package/runtime/colorschemes/gruvbox.micro +26 -0
- package/runtime/colorschemes/material-tc.micro +36 -0
- package/runtime/colorschemes/monokai-dark.micro +28 -0
- package/runtime/colorschemes/monokai.micro +34 -0
- package/runtime/colorschemes/one-dark.micro +39 -0
- package/runtime/colorschemes/railscast.micro +37 -0
- package/runtime/colorschemes/simple.micro +33 -0
- package/runtime/colorschemes/solarized-tc.micro +31 -0
- package/runtime/colorschemes/solarized.micro +30 -0
- package/runtime/colorschemes/sunny-day.micro +29 -0
- package/runtime/colorschemes/twilight.micro +40 -0
- package/runtime/colorschemes/zenburn.micro +30 -0
- package/runtime/help/actions.md +161 -0
- package/runtime/help/cdp.md +119 -0
- package/runtime/help/colors.md +421 -0
- package/runtime/help/commands.md +161 -0
- package/runtime/help/copypaste.md +149 -0
- package/runtime/help/defaultkeys.md +148 -0
- package/runtime/help/help.md +285 -0
- package/runtime/help/keybindings.md +355 -0
- package/runtime/help/linter.md +90 -0
- package/runtime/help/options.md +709 -0
- package/runtime/help/plugins.md +544 -0
- package/runtime/help/tutorial.md +112 -0
- package/runtime/jsplugins/cdp/cdp-server.js +1161 -0
- package/runtime/jsplugins/cdp/cdp.js +192 -0
- package/runtime/jsplugins/chapter/chapter.js +108 -0
- package/runtime/jsplugins/diff/diff.js +46 -0
- package/runtime/jsplugins/example/example.js +110 -0
- package/runtime/jsplugins/linter/linter.js +281 -0
- package/runtime/plugins/autoclose/autoclose.lua +75 -0
- package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
- package/runtime/plugins/literate/README.md +5 -0
- package/runtime/plugins/literate/literate.lua +55 -0
- package/runtime/plugins/status/help/status.md +21 -0
- package/runtime/plugins/status/status.lua +62 -0
- package/runtime/syntax/LICENSE +22 -0
- package/runtime/syntax/PowerShell.yaml +128 -0
- package/runtime/syntax/README.md +63 -0
- package/runtime/syntax/ada.yaml +43 -0
- package/runtime/syntax/apacheconf.yaml +59 -0
- package/runtime/syntax/arduino.yaml +101 -0
- package/runtime/syntax/asciidoc.yaml +51 -0
- package/runtime/syntax/asm.yaml +123 -0
- package/runtime/syntax/ats.yaml +99 -0
- package/runtime/syntax/awk.yaml +44 -0
- package/runtime/syntax/b.yaml +87 -0
- package/runtime/syntax/bat.yaml +57 -0
- package/runtime/syntax/c.yaml +60 -0
- package/runtime/syntax/caddyfile.yaml +23 -0
- package/runtime/syntax/cake.yaml +7 -0
- package/runtime/syntax/clojure.yaml +38 -0
- package/runtime/syntax/cmake.yaml +42 -0
- package/runtime/syntax/coffeescript.yaml +56 -0
- package/runtime/syntax/colortest.yaml +19 -0
- package/runtime/syntax/conky.yaml +17 -0
- package/runtime/syntax/cpp.yaml +91 -0
- package/runtime/syntax/crontab.yaml +36 -0
- package/runtime/syntax/crystal.yaml +72 -0
- package/runtime/syntax/csharp.yaml +52 -0
- package/runtime/syntax/css.yaml +44 -0
- package/runtime/syntax/csx.yaml +8 -0
- package/runtime/syntax/cuda.yaml +68 -0
- package/runtime/syntax/cython.yaml +52 -0
- package/runtime/syntax/d.yaml +121 -0
- package/runtime/syntax/dart.yaml +46 -0
- package/runtime/syntax/default.yaml +10 -0
- package/runtime/syntax/dockerfile.yaml +36 -0
- package/runtime/syntax/dot.yaml +29 -0
- package/runtime/syntax/elixir.yaml +30 -0
- package/runtime/syntax/elm.yaml +38 -0
- package/runtime/syntax/erb.yaml +42 -0
- package/runtime/syntax/erlang.yaml +45 -0
- package/runtime/syntax/fish.yaml +48 -0
- package/runtime/syntax/forth.yaml +34 -0
- package/runtime/syntax/fortran.yaml +64 -0
- package/runtime/syntax/freebsd-kernel.yaml +14 -0
- package/runtime/syntax/fsharp.yaml +48 -0
- package/runtime/syntax/gdscript.yaml +61 -0
- package/runtime/syntax/gemini.yaml +19 -0
- package/runtime/syntax/gentoo-ebuild.yaml +48 -0
- package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
- package/runtime/syntax/git-commit.yaml +35 -0
- package/runtime/syntax/git-config.yaml +14 -0
- package/runtime/syntax/git-rebase-todo.yaml +19 -0
- package/runtime/syntax/gleam.yaml +69 -0
- package/runtime/syntax/glsl.yaml +26 -0
- package/runtime/syntax/gnuplot.yaml +15 -0
- package/runtime/syntax/go.yaml +62 -0
- package/runtime/syntax/godoc.yaml +17 -0
- package/runtime/syntax/golo.yaml +73 -0
- package/runtime/syntax/gomod.yaml +31 -0
- package/runtime/syntax/graphql.yaml +47 -0
- package/runtime/syntax/groff.yaml +30 -0
- package/runtime/syntax/groovy.yaml +111 -0
- package/runtime/syntax/haml.yaml +16 -0
- package/runtime/syntax/hare.yaml +52 -0
- package/runtime/syntax/haskell.yaml +52 -0
- package/runtime/syntax/hc.yaml +52 -0
- package/runtime/syntax/html.yaml +70 -0
- package/runtime/syntax/html4.yaml +25 -0
- package/runtime/syntax/html5.yaml +25 -0
- package/runtime/syntax/ini.yaml +23 -0
- package/runtime/syntax/inputrc.yaml +14 -0
- package/runtime/syntax/java.yaml +37 -0
- package/runtime/syntax/javascript.yaml +124 -0
- package/runtime/syntax/jinja2.yaml +19 -0
- package/runtime/syntax/json.yaml +39 -0
- package/runtime/syntax/jsonnet.yaml +92 -0
- package/runtime/syntax/julia.yaml +57 -0
- package/runtime/syntax/justfile.yaml +40 -0
- package/runtime/syntax/keymap.yaml +27 -0
- package/runtime/syntax/kickstart.yaml +16 -0
- package/runtime/syntax/kotlin.yaml +66 -0
- package/runtime/syntax/kvlang.yaml +67 -0
- package/runtime/syntax/ledger.yaml +14 -0
- package/runtime/syntax/lfe.yaml +17 -0
- package/runtime/syntax/lilypond.yaml +26 -0
- package/runtime/syntax/lisp.yaml +17 -0
- package/runtime/syntax/log.yaml +92 -0
- package/runtime/syntax/lua.yaml +111 -0
- package/runtime/syntax/mail.yaml +25 -0
- package/runtime/syntax/makefile.yaml +38 -0
- package/runtime/syntax/man.yaml +12 -0
- package/runtime/syntax/markdown.yaml +49 -0
- package/runtime/syntax/mc.yaml +23 -0
- package/runtime/syntax/meson.yaml +51 -0
- package/runtime/syntax/micro.yaml +34 -0
- package/runtime/syntax/mpdconf.yaml +13 -0
- package/runtime/syntax/msbuild.yaml +6 -0
- package/runtime/syntax/nanorc.yaml +16 -0
- package/runtime/syntax/nftables.yaml +30 -0
- package/runtime/syntax/nginx.yaml +22 -0
- package/runtime/syntax/nim.yaml +27 -0
- package/runtime/syntax/nix.yaml +32 -0
- package/runtime/syntax/nu.yaml +114 -0
- package/runtime/syntax/objc.yaml +60 -0
- package/runtime/syntax/ocaml.yaml +43 -0
- package/runtime/syntax/octave.yaml +83 -0
- package/runtime/syntax/odin.yaml +64 -0
- package/runtime/syntax/pascal.yaml +45 -0
- package/runtime/syntax/patch.yaml +14 -0
- package/runtime/syntax/peg.yaml +16 -0
- package/runtime/syntax/perl.yaml +58 -0
- package/runtime/syntax/php.yaml +60 -0
- package/runtime/syntax/pkg-config.yaml +12 -0
- package/runtime/syntax/po.yaml +12 -0
- package/runtime/syntax/pony.yaml +37 -0
- package/runtime/syntax/pov.yaml +21 -0
- package/runtime/syntax/privoxy-action.yaml +14 -0
- package/runtime/syntax/privoxy-config.yaml +10 -0
- package/runtime/syntax/privoxy-filter.yaml +12 -0
- package/runtime/syntax/proto.yaml +40 -0
- package/runtime/syntax/prql.yaml +84 -0
- package/runtime/syntax/puppet.yaml +22 -0
- package/runtime/syntax/python2.yaml +60 -0
- package/runtime/syntax/python3.yaml +80 -0
- package/runtime/syntax/r.yaml +32 -0
- package/runtime/syntax/raku.yaml +42 -0
- package/runtime/syntax/reST.yaml +18 -0
- package/runtime/syntax/renpy.yaml +15 -0
- package/runtime/syntax/rpmspec.yaml +43 -0
- package/runtime/syntax/ruby.yaml +73 -0
- package/runtime/syntax/rust.yaml +78 -0
- package/runtime/syntax/sage.yaml +60 -0
- package/runtime/syntax/scad.yaml +53 -0
- package/runtime/syntax/scala.yaml +33 -0
- package/runtime/syntax/sed.yaml +13 -0
- package/runtime/syntax/sh.yaml +69 -0
- package/runtime/syntax/sls.yaml +15 -0
- package/runtime/syntax/smalltalk.yaml +55 -0
- package/runtime/syntax/solidity.yaml +41 -0
- package/runtime/syntax/sql.yaml +35 -0
- package/runtime/syntax/stata.yaml +67 -0
- package/runtime/syntax/svelte.yaml +27 -0
- package/runtime/syntax/swift.yaml +103 -0
- package/runtime/syntax/systemd.yaml +16 -0
- package/runtime/syntax/tcl.yaml +18 -0
- package/runtime/syntax/terraform.yaml +87 -0
- package/runtime/syntax/tex.yaml +32 -0
- package/runtime/syntax/toml.yaml +56 -0
- package/runtime/syntax/twig.yaml +55 -0
- package/runtime/syntax/typescript.yaml +49 -0
- package/runtime/syntax/v.yaml +80 -0
- package/runtime/syntax/vala.yaml +26 -0
- package/runtime/syntax/verilog.yaml +60 -0
- package/runtime/syntax/vhdl.yaml +37 -0
- package/runtime/syntax/vi.yaml +31 -0
- package/runtime/syntax/vue.yaml +64 -0
- package/runtime/syntax/xml.yaml +37 -0
- package/runtime/syntax/xresources.yaml +14 -0
- package/runtime/syntax/yaml.yaml +34 -0
- package/runtime/syntax/yum.yaml +12 -0
- package/runtime/syntax/zig.yaml +52 -0
- package/runtime/syntax/zscript.yaml +72 -0
- package/runtime/syntax/zsh.yaml +52 -0
- package/single-exe/README.md +80 -0
- package/single-exe/assetsHelper.js +90 -0
- package/single-exe/assetsLoader.mjs +85 -0
- package/single-exe/compiled.js +149 -0
- package/single-exe/entry.mjs +9 -0
- package/single-exe/packAssets.sh +7 -0
- package/src/buffer/backup.js +160 -0
- package/src/buffer/buffer.js +126 -0
- package/src/buffer/fixed3-codec.js +140 -0
- package/src/buffer/loc.js +38 -0
- package/src/buffer/message.js +29 -0
- package/src/config/clean.js +172 -0
- package/src/config/colorscheme.js +99 -0
- package/src/config/config.js +122 -0
- package/src/config/defaults.js +109 -0
- package/src/cui/rpc.mjs +259 -0
- package/src/cui/server.mjs +116 -0
- package/src/display/ansi-style.js +60 -0
- package/src/highlight/highlighter.js +243 -0
- package/src/highlight/parser.js +225 -0
- package/src/index.js +8009 -0
- package/src/lua/engine.js +71 -0
- package/src/platform/archive.js +50 -0
- package/src/platform/clipboard.js +278 -0
- package/src/platform/commands.js +137 -0
- package/src/plugins/js-bridge.js +983 -0
- package/src/plugins/manager.js +674 -0
- package/src/runtime/assets.js +90 -0
- package/src/runtime/compiled.js +25 -0
- package/src/runtime/encodings.js +10 -0
- package/src/runtime/registry.js +134 -0
- package/src/screen/cell-buffer.js +81 -0
- package/src/screen/events.js +263 -0
- package/src/screen/screen.js +142 -0
- package/src/screen/vt100.js +571 -0
- package/src/shell/shell.js +70 -0
- package/testapp.md +55 -0
- package/tests/backup.test.js +133 -0
- package/tests/cmphex3b64.js +95 -0
- package/tests/pty-demo.js +492 -0
- package/tests/wv-client.js +96 -0
- package/tui +5 -0
- package/wui +5 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
color-link comment "blue"
|
|
2
|
+
color-link constant "red"
|
|
3
|
+
color-link identifier "cyan"
|
|
4
|
+
color-link statement "yellow"
|
|
5
|
+
color-link symbol "yellow"
|
|
6
|
+
color-link preproc "magenta"
|
|
7
|
+
color-link type "green"
|
|
8
|
+
color-link special "magenta"
|
|
9
|
+
color-link ignore "default"
|
|
10
|
+
color-link error ",brightred"
|
|
11
|
+
color-link todo ",brightyellow"
|
|
12
|
+
color-link hlsearch "black,yellow"
|
|
13
|
+
color-link statusline "black,white"
|
|
14
|
+
color-link indent-char "black"
|
|
15
|
+
color-link line-number "yellow"
|
|
16
|
+
color-link current-line-number "red"
|
|
17
|
+
color-link diff-added "green"
|
|
18
|
+
color-link diff-modified "yellow"
|
|
19
|
+
color-link diff-deleted "red"
|
|
20
|
+
color-link gutter-error ",red"
|
|
21
|
+
color-link gutter-warning "red"
|
|
22
|
+
#Cursor line causes readability issues. Disabled for now.
|
|
23
|
+
#color-link cursor-line "white,black"
|
|
24
|
+
color-link color-column "white"
|
|
25
|
+
#No extended types. (bool in C)
|
|
26
|
+
color-link type.extended "default"
|
|
27
|
+
#No bracket highlighting.
|
|
28
|
+
color-link symbol.brackets "default"
|
|
29
|
+
#Color shebangs the comment color
|
|
30
|
+
color-link preproc.shebang "comment"
|
|
31
|
+
color-link match-brace ",magenta"
|
|
32
|
+
color-link tab-error "brightred"
|
|
33
|
+
color-link trailingws "brightred"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
color-link default "#839496,#002833"
|
|
2
|
+
color-link comment "#586E75,#002833"
|
|
3
|
+
color-link identifier "#268BD2,#002833"
|
|
4
|
+
color-link constant "#2AA198,#002833"
|
|
5
|
+
color-link constant.specialChar "#DC322F,#002833"
|
|
6
|
+
color-link statement "#859900,#002833"
|
|
7
|
+
color-link symbol "#859900,#002833"
|
|
8
|
+
color-link preproc "#CB4B16,#002833"
|
|
9
|
+
color-link type "#B58900,#002833"
|
|
10
|
+
color-link special "#268BD2,#002833"
|
|
11
|
+
color-link underlined "#D33682,#002833"
|
|
12
|
+
color-link error "bold #CB4B16,#002833"
|
|
13
|
+
color-link todo "bold #D33682,#002833"
|
|
14
|
+
color-link hlsearch "#002833,#B58900"
|
|
15
|
+
color-link statusline "#003541,#839496"
|
|
16
|
+
color-link tabbar "#003541,#839496"
|
|
17
|
+
color-link indent-char "#003541,#002833"
|
|
18
|
+
color-link line-number "#586E75,#003541"
|
|
19
|
+
color-link current-line-number "#586E75,#002833"
|
|
20
|
+
color-link diff-added "#00AF00"
|
|
21
|
+
color-link diff-modified "#FFAF00"
|
|
22
|
+
color-link diff-deleted "#D70000"
|
|
23
|
+
color-link gutter-error "#003541,#CB4B16"
|
|
24
|
+
color-link gutter-warning "#CB4B16,#002833"
|
|
25
|
+
color-link cursor-line "#003541"
|
|
26
|
+
color-link color-column "#003541"
|
|
27
|
+
color-link type.extended "#839496,#002833"
|
|
28
|
+
color-link symbol.brackets "#839496,#002833"
|
|
29
|
+
color-link match-brace "#002833,#268BD2"
|
|
30
|
+
color-link tab-error "#D75F5F"
|
|
31
|
+
color-link trailingws "#D75F5F"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
color-link comment "bold brightgreen"
|
|
2
|
+
color-link constant "cyan"
|
|
3
|
+
color-link constant.specialChar "red"
|
|
4
|
+
color-link identifier "blue"
|
|
5
|
+
color-link statement "green"
|
|
6
|
+
color-link symbol "green"
|
|
7
|
+
color-link preproc "brightred"
|
|
8
|
+
color-link type "yellow"
|
|
9
|
+
color-link special "blue"
|
|
10
|
+
color-link underlined "magenta"
|
|
11
|
+
color-link error "bold brightred"
|
|
12
|
+
color-link todo "bold magenta"
|
|
13
|
+
color-link hlsearch "black,yellow"
|
|
14
|
+
color-link statusline "black,brightblue"
|
|
15
|
+
color-link tabbar "black,brightblue"
|
|
16
|
+
color-link indent-char "black"
|
|
17
|
+
color-link line-number "bold brightgreen,black"
|
|
18
|
+
color-link current-line-number "bold brightgreen,default"
|
|
19
|
+
color-link diff-added "green"
|
|
20
|
+
color-link diff-modified "yellow"
|
|
21
|
+
color-link diff-deleted "red"
|
|
22
|
+
color-link gutter-error "black,brightred"
|
|
23
|
+
color-link gutter-warning "brightred,default"
|
|
24
|
+
color-link cursor-line "black"
|
|
25
|
+
color-link color-column "black"
|
|
26
|
+
color-link type.extended "default"
|
|
27
|
+
color-link symbol.brackets "default"
|
|
28
|
+
color-link match-brace ",blue"
|
|
29
|
+
color-link tab-error "brightred"
|
|
30
|
+
color-link trailingws "brightred"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
color-link default "0,230"
|
|
2
|
+
color-link comment "244"
|
|
3
|
+
color-link constant.string "17"
|
|
4
|
+
color-link constant "88"
|
|
5
|
+
color-link identifier "22"
|
|
6
|
+
color-link statement "0,230"
|
|
7
|
+
color-link symbol "89"
|
|
8
|
+
color-link preproc "22"
|
|
9
|
+
color-link type "88"
|
|
10
|
+
color-link special "22"
|
|
11
|
+
color-link underlined "61,230"
|
|
12
|
+
color-link error "88"
|
|
13
|
+
color-link todo "210"
|
|
14
|
+
color-link hlsearch "0,253"
|
|
15
|
+
color-link statusline "233,229"
|
|
16
|
+
color-link tabbar "233,229"
|
|
17
|
+
color-link indent-char "229"
|
|
18
|
+
color-link line-number "244"
|
|
19
|
+
color-link diff-added "34"
|
|
20
|
+
color-link diff-modified "214"
|
|
21
|
+
color-link diff-deleted "160"
|
|
22
|
+
color-link gutter-error "88"
|
|
23
|
+
color-link gutter-warning "88"
|
|
24
|
+
color-link cursor-line "229"
|
|
25
|
+
#color-link color-column "196"
|
|
26
|
+
color-link current-line-number "246"
|
|
27
|
+
color-link match-brace "230,22"
|
|
28
|
+
color-link tab-error "210"
|
|
29
|
+
color-link trailingws "210"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Twilight color scheme
|
|
2
|
+
color-link default "#F8F8F8,#141414"
|
|
3
|
+
color-link color-column "#1B1B1B"
|
|
4
|
+
color-link comment "#5F5A60"
|
|
5
|
+
color-link constant "#CF6A4C"
|
|
6
|
+
#color-link constant.number "#CF6A4C"
|
|
7
|
+
color-link constant.specialChar "#DDF2A4"
|
|
8
|
+
color-link constant.string "#8F9D6A"
|
|
9
|
+
color-link current-line-number "#868686,#1B1B1B"
|
|
10
|
+
color-link cursor-line "#1B1B1B"
|
|
11
|
+
color-link divider "#1E1E1E"
|
|
12
|
+
color-link error "#D2A8A1"
|
|
13
|
+
color-link diff-added "#00AF00"
|
|
14
|
+
color-link diff-modified "#FFAF00"
|
|
15
|
+
color-link diff-deleted "#D70000"
|
|
16
|
+
color-link gutter-error "#9B859D"
|
|
17
|
+
color-link gutter-warning "#9B859D"
|
|
18
|
+
color-link hlsearch "#141414,#C0C000"
|
|
19
|
+
color-link identifier "#9B703F"
|
|
20
|
+
color-link identifier.class "#DAD085"
|
|
21
|
+
color-link identifier.var "#7587A6"
|
|
22
|
+
color-link indent-char "#515151"
|
|
23
|
+
color-link line-number "#868686,#1B1B1B"
|
|
24
|
+
color-link current-line-number "#868686,#141414"
|
|
25
|
+
color-link preproc "#E0C589"
|
|
26
|
+
color-link special "#E0C589"
|
|
27
|
+
color-link statement "#CDA869"
|
|
28
|
+
color-link statusline "#515151,#1E1E1E"
|
|
29
|
+
color-link symbol "#AC885B"
|
|
30
|
+
color-link symbol.brackets "#F8F8F8"
|
|
31
|
+
color-link symbol.operator "#CDA869"
|
|
32
|
+
color-link symbol.tag "#AC885B"
|
|
33
|
+
color-link tabbar "#F2F0EC,#2D2D2D"
|
|
34
|
+
color-link todo "#8B98AB"
|
|
35
|
+
color-link type "#F9EE98"
|
|
36
|
+
color-link type.keyword "#CDA869"
|
|
37
|
+
color-link underlined "#8996A8"
|
|
38
|
+
color-link match-brace "#141414,#E0C589"
|
|
39
|
+
color-link tab-error "#D75F5F"
|
|
40
|
+
color-link trailingws "#D75F5F"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
color-link default "188,237"
|
|
2
|
+
color-link comment "108,237"
|
|
3
|
+
color-link constant.string "174,237"
|
|
4
|
+
color-link constant.number "116,237"
|
|
5
|
+
color-link constant "181,237"
|
|
6
|
+
color-link identifier "223,237"
|
|
7
|
+
color-link statement "223,237"
|
|
8
|
+
color-link symbol "223,237"
|
|
9
|
+
color-link preproc "223,237"
|
|
10
|
+
color-link type "187,237"
|
|
11
|
+
color-link special "181,237"
|
|
12
|
+
color-link underlined "188,237"
|
|
13
|
+
color-link error "115,236"
|
|
14
|
+
color-link todo "bold 254,237"
|
|
15
|
+
color-link hlsearch "230,22"
|
|
16
|
+
color-link statusline "186,236"
|
|
17
|
+
color-link tabbar "186,236"
|
|
18
|
+
color-link indent-char "238,237"
|
|
19
|
+
color-link line-number "248,238"
|
|
20
|
+
color-link diff-added "34"
|
|
21
|
+
color-link diff-modified "214"
|
|
22
|
+
color-link diff-deleted "160"
|
|
23
|
+
color-link gutter-error "237,174"
|
|
24
|
+
color-link gutter-warning "174,237"
|
|
25
|
+
color-link cursor-line "238"
|
|
26
|
+
color-link color-column "238"
|
|
27
|
+
color-link current-line-number "188,237"
|
|
28
|
+
color-link match-brace "237,223"
|
|
29
|
+
color-link tab-error "167"
|
|
30
|
+
color-link trailingws "167"
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Actions
|
|
2
|
+
- Actions can be used with the `act` / `action` command
|
|
3
|
+
- (not implemented) or bound to keys via `bind`.
|
|
4
|
+
|
|
5
|
+
# Cursor Movement
|
|
6
|
+
|
|
7
|
+
- CursorUp
|
|
8
|
+
- CursorDown
|
|
9
|
+
- CursorLeft
|
|
10
|
+
- CursorRight
|
|
11
|
+
- CursorWordLeft
|
|
12
|
+
- CursorWordRight
|
|
13
|
+
- WordLeft
|
|
14
|
+
- WordRight
|
|
15
|
+
- SubWordLeft
|
|
16
|
+
- SubWordRight
|
|
17
|
+
- StartOfLine
|
|
18
|
+
- StartOfText
|
|
19
|
+
- StartOfTextToggle
|
|
20
|
+
- EndOfLine
|
|
21
|
+
- CursorStart
|
|
22
|
+
- CursorEnd
|
|
23
|
+
- Start
|
|
24
|
+
- End
|
|
25
|
+
- ParagraphPrevious
|
|
26
|
+
- ParagraphNext
|
|
27
|
+
- PageUp
|
|
28
|
+
- PageDown
|
|
29
|
+
- CursorPageUp
|
|
30
|
+
- CursorPageDown
|
|
31
|
+
- HalfPageUp
|
|
32
|
+
- HalfPageDown
|
|
33
|
+
- CursorToViewTop
|
|
34
|
+
- CursorToViewCenter
|
|
35
|
+
- CursorToViewBottom
|
|
36
|
+
- ScrollUp
|
|
37
|
+
- ScrollDown
|
|
38
|
+
- Center
|
|
39
|
+
|
|
40
|
+
# Selection
|
|
41
|
+
|
|
42
|
+
- SelectUp
|
|
43
|
+
- SelectDown
|
|
44
|
+
- SelectLeft
|
|
45
|
+
- SelectRight
|
|
46
|
+
- SelectWordLeft
|
|
47
|
+
- SelectWordRight
|
|
48
|
+
- SelectSubWordLeft
|
|
49
|
+
- SelectSubWordRight
|
|
50
|
+
- SelectToStartOfLine
|
|
51
|
+
- SelectToEndOfLine
|
|
52
|
+
- SelectToStartOfText
|
|
53
|
+
- SelectToStartOfTextToggle
|
|
54
|
+
- SelectToStart
|
|
55
|
+
- SelectToEnd
|
|
56
|
+
- SelectPageUp
|
|
57
|
+
- SelectPageDown
|
|
58
|
+
- SelectToParagraphPrevious
|
|
59
|
+
- SelectToParagraphNext
|
|
60
|
+
- SelectAll
|
|
61
|
+
- SelectLine
|
|
62
|
+
- Deselect
|
|
63
|
+
|
|
64
|
+
# Editing
|
|
65
|
+
|
|
66
|
+
- Backspace
|
|
67
|
+
- Delete
|
|
68
|
+
- InsertNewline
|
|
69
|
+
- InsertTab
|
|
70
|
+
- Undo
|
|
71
|
+
- Redo
|
|
72
|
+
- DeleteWordLeft
|
|
73
|
+
- DeleteWordRight
|
|
74
|
+
- IndentLine
|
|
75
|
+
- OutdentLine
|
|
76
|
+
- IndentSelection
|
|
77
|
+
- OutdentSelection
|
|
78
|
+
- MoveLinesUp
|
|
79
|
+
- MoveLinesDown
|
|
80
|
+
- DuplicateLine
|
|
81
|
+
- Duplicate
|
|
82
|
+
- DeleteLine
|
|
83
|
+
- ToggleComment
|
|
84
|
+
- Retab
|
|
85
|
+
|
|
86
|
+
# Clipboard
|
|
87
|
+
|
|
88
|
+
- Copy
|
|
89
|
+
- CopyLine
|
|
90
|
+
- Cut
|
|
91
|
+
- CutLine
|
|
92
|
+
- Paste
|
|
93
|
+
- PastePrimary
|
|
94
|
+
|
|
95
|
+
# Search
|
|
96
|
+
|
|
97
|
+
- Find
|
|
98
|
+
- FindNext
|
|
99
|
+
- FindPrevious
|
|
100
|
+
- FindLiteral
|
|
101
|
+
- ToggleHighlightSearch
|
|
102
|
+
- UnhighlightSearch
|
|
103
|
+
- ResetSearch
|
|
104
|
+
|
|
105
|
+
# File and Buffers
|
|
106
|
+
|
|
107
|
+
- Save
|
|
108
|
+
- SaveAs
|
|
109
|
+
- SaveAll
|
|
110
|
+
- OpenFile
|
|
111
|
+
- Quit
|
|
112
|
+
- ForceQuit
|
|
113
|
+
- QuitAll
|
|
114
|
+
|
|
115
|
+
# Tabs
|
|
116
|
+
|
|
117
|
+
- AddTab
|
|
118
|
+
- NextTab
|
|
119
|
+
- PreviousTab
|
|
120
|
+
- PrevTab
|
|
121
|
+
- FirstTab
|
|
122
|
+
- LastTab
|
|
123
|
+
|
|
124
|
+
# Splits
|
|
125
|
+
|
|
126
|
+
- VSplitAction
|
|
127
|
+
- HSplitAction
|
|
128
|
+
- NextSplit
|
|
129
|
+
- PreviousSplit
|
|
130
|
+
- FirstSplit
|
|
131
|
+
- LastSplit
|
|
132
|
+
- Unsplit
|
|
133
|
+
|
|
134
|
+
# Diff
|
|
135
|
+
|
|
136
|
+
- DiffNext
|
|
137
|
+
- DiffPrevious
|
|
138
|
+
- ToggleDiffGutter
|
|
139
|
+
|
|
140
|
+
# Autocomplete
|
|
141
|
+
|
|
142
|
+
- Autocomplete
|
|
143
|
+
- CycleAutocompleteBack
|
|
144
|
+
|
|
145
|
+
# Navigation
|
|
146
|
+
|
|
147
|
+
- JumpLine
|
|
148
|
+
- JumpToMatchingBrace
|
|
149
|
+
|
|
150
|
+
# UI and Modes
|
|
151
|
+
|
|
152
|
+
- CommandMode
|
|
153
|
+
- ShellMode
|
|
154
|
+
- ToggleHelp
|
|
155
|
+
- ToggleRuler
|
|
156
|
+
- ToggleKeyMenu
|
|
157
|
+
- ToggleOverwriteMode
|
|
158
|
+
- Escape
|
|
159
|
+
- ClearInfo
|
|
160
|
+
- ClearStatus
|
|
161
|
+
- None
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
|
|
3
|
+
// ─── CDP (Chrome DevTools Protocol) ────────────────────────────────────────
|
|
4
|
+
//
|
|
5
|
+
// bunmicro can act as a CDP target, letting external scripts control it
|
|
6
|
+
// the same way Playwright or Bun.WebView controls a browser.
|
|
7
|
+
//
|
|
8
|
+
// ── Starting the server ────────────────────────────────────────────────────
|
|
9
|
+
//
|
|
10
|
+
// Inside the editor:
|
|
11
|
+
// Ctrl-E cdp → 127.0.0.1:9222
|
|
12
|
+
// Ctrl-E cdp 9000 → 127.0.0.1:9000
|
|
13
|
+
// Ctrl-E cdp --public → 0.0.0.0:9222
|
|
14
|
+
// Ctrl-E cdp 9000 --public → 0.0.0.0:9000
|
|
15
|
+
// Ctrl-E cdp --address=192.168.1.1 → 192.168.1.1:9222
|
|
16
|
+
// Ctrl-E cdp 9000 --address=192.168.1.1 → 192.168.1.1:9000
|
|
17
|
+
//
|
|
18
|
+
// From the command line (Chrome-style):
|
|
19
|
+
// bunmicro --remote-debugging-port=9222 file.txt
|
|
20
|
+
// bunmicro --remote-debugging-port=9222 --remote-debugging-address=0.0.0.0 file.txt
|
|
21
|
+
//
|
|
22
|
+
// Once running, status bar shows: CDP@<port> server running
|
|
23
|
+
// Running cdp again shows: CDP@<port> already running
|
|
24
|
+
//
|
|
25
|
+
// ── Connecting ─────────────────────────────────────────────────────────────
|
|
26
|
+
//
|
|
27
|
+
// Bun.WebView:
|
|
28
|
+
// const view = new Bun.WebView({
|
|
29
|
+
// backend: { type: "chrome", url: "ws://127.0.0.1:9222" }
|
|
30
|
+
// });
|
|
31
|
+
//
|
|
32
|
+
// Playwright (Node/Bun):
|
|
33
|
+
// const browser = await chromium.connectOverCDP("http://127.0.0.1:9222");
|
|
34
|
+
//
|
|
35
|
+
// ── Available methods ───────────────────────────────────────────────────────
|
|
36
|
+
//
|
|
37
|
+
// view.navigate(url) open file or URL in editor (Ctrl-E open)
|
|
38
|
+
// view.type(text) insert text at cursor
|
|
39
|
+
// view.press(key, opts?) send a key press
|
|
40
|
+
// key: "Enter","Backspace","Tab","Escape",
|
|
41
|
+
// "ArrowUp/Down/Left/Right",
|
|
42
|
+
// "Home","End","PageUp","PageDown",
|
|
43
|
+
// or single char "a"
|
|
44
|
+
// opts: { modifiers: bitmask }
|
|
45
|
+
// Alt=1 Ctrl=2 Meta=4 Shift=8
|
|
46
|
+
// view.click(x, y) move cursor to column x, line y (1-based)
|
|
47
|
+
// view.scroll(dx, dy) move cursor by dx cols and dy lines
|
|
48
|
+
// view.scrollTo(selector) find text or #anchor and jump to it
|
|
49
|
+
// view.evaluate(jsCode) run JS inside bunmicro's plugin context
|
|
50
|
+
// e.g. "micro.cmd.save()"
|
|
51
|
+
// view.goBack() switch to previous tab (PrevTab)
|
|
52
|
+
// view.goForward() switch to next tab (NextTab)
|
|
53
|
+
// view.resize(w, h) accepted by protocol but not yet implemented
|
|
54
|
+
//
|
|
55
|
+
// ── Example script below ───────────────────────────────────────────────────
|
|
56
|
+
// ctrl-a ctrl-c = select+copy all
|
|
57
|
+
// ctrl-t = new tab
|
|
58
|
+
// ctrl-v = paste
|
|
59
|
+
// ctrl-s filename.js enter
|
|
60
|
+
// run with bun filename.js
|
|
61
|
+
|
|
62
|
+
const cdpUrl = "ws://127.0.0.1:9222";
|
|
63
|
+
|
|
64
|
+
const view = new Bun.WebView({
|
|
65
|
+
backend: {
|
|
66
|
+
type: "chrome",
|
|
67
|
+
url: cdpUrl,
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
view.onNavigated = (url, title) => {
|
|
72
|
+
console.log(`[navigated] ${title || "(no title)"} — ${url.slice(0, 80)}`);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const delay = Bun.sleep
|
|
76
|
+
const startInterval = 1000
|
|
77
|
+
const interval = 500
|
|
78
|
+
|
|
79
|
+
try {
|
|
80
|
+
|
|
81
|
+
await delay(startInterval);
|
|
82
|
+
|
|
83
|
+
await view.navigate("https://raw.githubusercontent.com/jjtseng93/bunmicro/refs/heads/main/hlw.md");
|
|
84
|
+
await delay(interval);
|
|
85
|
+
|
|
86
|
+
await view.evaluate(
|
|
87
|
+
"micro.cmd.tab()"
|
|
88
|
+
);
|
|
89
|
+
await delay(interval);
|
|
90
|
+
|
|
91
|
+
await view.goBack();
|
|
92
|
+
await delay(interval);
|
|
93
|
+
|
|
94
|
+
//await view.goForward();
|
|
95
|
+
//await delay(interval);
|
|
96
|
+
|
|
97
|
+
await view.scrollTo("#hello");
|
|
98
|
+
await view.evaluate('micro.action.StartOfLine()');
|
|
99
|
+
await delay(interval);
|
|
100
|
+
|
|
101
|
+
await view.type("# Bun is great");
|
|
102
|
+
await delay(interval);
|
|
103
|
+
|
|
104
|
+
await view.press("Enter");
|
|
105
|
+
await delay(interval);
|
|
106
|
+
|
|
107
|
+
await view.click(3,3);
|
|
108
|
+
await delay(interval);
|
|
109
|
+
await view.scroll(4,3);
|
|
110
|
+
|
|
111
|
+
await view.resize(1280, 720);
|
|
112
|
+
await delay(interval);
|
|
113
|
+
|
|
114
|
+
console.log(
|
|
115
|
+
Bun.markdown.ansi('### All done')
|
|
116
|
+
)
|
|
117
|
+
} finally {
|
|
118
|
+
view.close();
|
|
119
|
+
}
|