diff options
Diffstat (limited to 'docs/typ/cheatsheet.typ')
| -rw-r--r-- | docs/typ/cheatsheet.typ | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/docs/typ/cheatsheet.typ b/docs/typ/cheatsheet.typ index c4be1641..61ca4f03 100644 --- a/docs/typ/cheatsheet.typ +++ b/docs/typ/cheatsheet.typ @@ -2,7 +2,7 @@ // cheatsheet-a4.typ lays it out; style.typ says how each element looks. // config.zig's "docs/typ" test checks every #word, #key and #tag here // against the registry, the keymap and the default tags. -#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs +#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs, fstree == The mouse #pairs( @@ -41,12 +41,12 @@ Typed anywhere, then #btn("B3") or #key("Enter"): addr(":40"), [the pane looked from, line 40 (`:40:5`, any address after `:`)], addr("~/x"), [home; also in #word("Save"), #word("Restore"), `pardes ~/x`], addr("@p3:12"), [pane 3 by serial, a terminal's lines too], - addr("src/"), [a directory: `ls` in an idle terminal there, else a new one], + addr("src/"), [a directory: a pane listing it; `Get` reads it again], ) Addresses are sam's: `#n`, `/re/`, `?re?`, `$`, `a,b`. #doc("fs", section: "look-and-exec") == Keys: normal mode -Helix-style: motions *select*, then an edit acts on the selection. Mode box: blank normal, `^` insert, `$` raw terminal. +Helix-style: motions *select*, then an edit acts on the selection. Mode box: blank normal, `^` insert, `$` raw terminal. Every helix key: #link("https://docs.helix-editor.com/keymap.html")[its keymap]. #pairs( [#keys("h", "j", "k", "l") #keys("w", "b", "e")], [move; words select], [#keys("g g", "g e")], [first line, last line], @@ -74,14 +74,14 @@ Helix-style: motions *select*, then an edit acts on the selection. Mode box: bla [#key("Ctrl-w") #keys("h", "j", "k", "l")], [then a direction: focus a neighbour (not in insert or raw `$`)], [#key("Esc")], [back to the previous pane (raw: only at a prompt with nothing typed; insert: to normal)], [#key("Shift-Esc")], [back to the previous pane from any mode, with the kitty keyboard protocol or in the GUI; elsewhere a plain Esc], - [#keys("Ctrl-o", "Ctrl-i")], [jump history back, forward], + [#keys("Ctrl-o", "Ctrl-i")], [jump history back, forward; this file first. #key("Ctrl-i") is #key("Tab") without the kitty protocol: #key("SPC j i")], [#key("Alt-n")], [new terminal below], [#key("Alt-c")], [move the pane to a new column], ) == The leader: #key("SPC") in normal mode #pairs(split: 2, - key("SPC ?"), [every path], + key("SPC ?"), [#word("Help"): every builtin], key("SPC f s"), word("Save"), key("SPC f n"), word("New"), key("SPC f f"), word("Find"), @@ -134,15 +134,21 @@ Helix-style: motions *select*, then an edit acts on the selection. Mode box: bla Pane shells get `$PARDES_9P` (the socket) and `$PARDES_PANE` (their own pane); a command clicked in a pane also gets `$winid`, the pane it was clicked in. #cmd("9ns --mntgen # then m=$PARDES_MOUNT in every pane") #cmd("9p -a \"unix!$PARDES_9P\" read index") -#pairs( - file("index"), [a line per pane: serial, kind, name], - file("look exec"), [write a line: a #btn("B3") or #btn("B2")], - file("log"), [events; write `follow` to wait], - file("pane/new"), [open to make a pane], - file("pane/N/addr"), [an address; `data` reads/replaces it], - file("pane/N/ctl"), [builtins: #word("Save"), #word("Edit") `...`], - file("pane/N/body tag"), [its text (`>>` appends)], -) +#fstree(``` +index a line per pane @rules +look write: a #word("Look") @look-and-exec +exec write: an #word("Exec") @look-and-exec +log events; follow waits @log +pane/ + new open: a new pane @panes + <n>/ + addr where data reads, writes @addresses + ctl builtins: #word("Save"), #word("Edit") … @panes + body its text (>> appends) @panes + data the text at addr @addresses + look a #word("Look") here @look-and-exec + exec an #word("Exec") here @look-and-exec +```) #cmd("echo notes.txt:12 > $m/pane/$n/look") #cmd("echo /foo/ > $m/pane/$n/addr; printf bar > $m/pane/$n/data") #cmd("echo 'Edit ,x/foo/c/bar/' > $m/pane/$n/ctl") |
