summaryrefslogtreecommitdiff
path: root/docs/typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 13:33:31 -0300
committerGabriel Schneider <[email protected]>2026-10-01 13:33:31 -0300
commit59f3f59cc8bdd7c012050cd2e1d4cbb41b473642 (patch)
treedcf1cf4f5a9f6786b8158735174f1536faf4fe5f /docs/typ
parent9041146c264002b067bdaebf83945442df2511a0 (diff)
downloadpardes-59f3f59cc8bdd7c012050cd2e1d4cbb41b473642.tar.gz
pardes-59f3f59cc8bdd7c012050cd2e1d4cbb41b473642.zip
Show, don't tell: the guide, the tutor, scripting, setup and the landing lead show an example first and cut the prose it makes redundant; the reference's 9P tree and REPLs name Look and Exec
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/typ')
-rw-r--r--docs/typ/cheatsheet-a4.pdf6
-rw-r--r--docs/typ/guide.typ216
-rw-r--r--docs/typ/reference.typ12
-rw-r--r--docs/typ/scripting.typ60
-rw-r--r--docs/typ/setup.typ29
5 files changed, 169 insertions, 154 deletions
diff --git a/docs/typ/cheatsheet-a4.pdf b/docs/typ/cheatsheet-a4.pdf
index 56a03f76..9ef291b9 100644
--- a/docs/typ/cheatsheet-a4.pdf
+++ b/docs/typ/cheatsheet-a4.pdf
@@ -1575,12 +1575,12 @@ x�}��Kq�?�U�X 94%MQKS��N�#Ԧ��Q�v��B�ˡ�h�Fk ������!
endstream
endobj
426 0 obj
-<</Creator(Typst 0.15.1)/ModDate(D:20261001132530-03'00)/CreationDate(D:20261001132530-03'00)>>
+<</Creator(Typst 0.15.1)/ModDate(D:20261001133131-03'00)/CreationDate(D:20261001133131-03'00)>>
endobj
427 0 obj
<</Length 996/Type/Metadata/Subtype/XML>>
stream
-<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><xmp:CreatorTool>Typst 0.15.1</xmp:CreatorTool><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmp:ModifyDate>2026-10-01T13:25:30-03:00</xmp:ModifyDate><xmp:CreateDate>2026-10-01T13:25:30-03:00</xmp:CreateDate><xmpTPg:NPages>1</xmpTPg:NPages><dc:format>application/pdf</dc:format><xmpMM:InstanceID>OOif4K7JjdxOKjgkkXjjqA==</xmpMM:InstanceID><xmpMM:DocumentID>OOif4K7JjdxOKjgkkXjjqA==</xmpMM:DocumentID><xmpMM:RenditionClass>proof</xmpMM:RenditionClass><pdf:PDFVersion>1.7</pdf:PDFVersion></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?>
+<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><xmp:CreatorTool>Typst 0.15.1</xmp:CreatorTool><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmp:ModifyDate>2026-10-01T13:31:31-03:00</xmp:ModifyDate><xmp:CreateDate>2026-10-01T13:31:31-03:00</xmp:CreateDate><xmpTPg:NPages>1</xmpTPg:NPages><dc:format>application/pdf</dc:format><xmpMM:InstanceID>IcrvJ+JD6aLZ3AQsDl9daw==</xmpMM:InstanceID><xmpMM:DocumentID>IcrvJ+JD6aLZ3AQsDl9daw==</xmpMM:DocumentID><xmpMM:RenditionClass>proof</xmpMM:RenditionClass><pdf:PDFVersion>1.7</pdf:PDFVersion></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?>
endstream
endobj
428 0 obj
@@ -2018,7 +2018,7 @@ xref
0000109208 00000 n
0000110281 00000 n
trailer
-<</Size 429/Root 428 0 R/Info 426 0 R/ID[(OOif4K7JjdxOKjgkkXjjqA==)(OOif4K7JjdxOKjgkkXjjqA==)]>>
+<</Size 429/Root 428 0 R/Info 426 0 R/ID[(IcrvJ+JD6aLZ3AQsDl9daw==)(IcrvJ+JD6aLZ3AQsDl9daw==)]>>
startxref
110468
%%EOF \ No newline at end of file
diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ
index 8c378c70..e2b9ae77 100644
--- a/docs/typ/guide.typ
+++ b/docs/typ/guide.typ
@@ -4,13 +4,12 @@
#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs, glossary
pardes reads the text on its screen as things to do, with two builtins.
-#word("Look") (right-click): open the `file:line`, address or URL the text
-names, or else find the text. #word("Exec") (middle-click): run the builtin
-the text names, or else run it as a shell line. Everything else is where
-that happens: columns of panes, each a tag (a line of words) over a body
-that is a file you edit, a terminal, a PDF or an image, with a tag for each
-column and the workspace above. The keys are helix's, in modes, and every
-session is also a virtual filesystem, served over 9P, for scripts.
+#word("Look") (right-click) on `src/bar.c:12` opens that line; on a URL,
+the browser; on any other word, its next place. #word("Exec")
+(middle-click) on `Save` runs that builtin; on `make`, a shell line. The
+screen is columns of panes, each a tag (a line of words) over a file, a
+terminal, a PDF or an image. The keys are helix's, and every session is a
+virtual filesystem, served over 9P, for scripts.
#glossary("Words you'll see", <words>,
[tag], [the line of words over a pane, a column or the screen; every word in it can be clicked],
@@ -26,8 +25,7 @@ session is also a virtual filesystem, served over 9P, for scripts.
= Modes <modes>
-Each pane has its own mode and keeps it while you are elsewhere. The box
-at the left of a pane's tag shows it.
+Each pane keeps its own mode, shown in the box left of its tag.
#pairs(
[normal (blank)], [keys move and select; an edit acts on the selection. File and PDF panes start here, and so does a terminal from #key("Alt-n").],
@@ -35,26 +33,28 @@ at the left of a pane's tag shows it.
[raw (`$`), terminals only], [keys go to the program. A terminal from #word("Tty"), the shell a bare `pardes` starts with, and a command pane start here.],
)
-#key("Ctrl-b") switches a terminal between raw and normal; in normal mode
-its prompts are hidden and its text is a page to move over and copy from.
-#word("Mode") in the tag steps raw, normal, insert.
+#key("Ctrl-b") switches a terminal between raw and normal; in normal its
+text is a page to move over and copy from, prompts hidden. #word("Mode")
+in the tag steps raw, normal, insert.
#pairs(
- [normal], [#key("Esc"): back to the previous pane (#word("Last")). #key("Shift-Esc"): the same.],
+ [normal], [#key("Esc"): back to the previous pane (#word("Last")), unlike helix. #key("Shift-Esc"): the same.],
[insert], [#key("Esc"): back to normal. #key("Shift-Esc"): out of insert and back to the previous pane.],
[raw `$`], [#key("Esc"): to the program, except at a shell prompt with nothing typed on it, where it goes back to the previous pane. #key("Shift-Esc"): always back. Either way the terminal stays `$`.],
[a PDF], [#key("Esc"): clears the selection and the search highlights. #key("Shift-Esc"): back to the previous pane.],
)
-Unlike helix, #key("Esc") in normal mode leaves the pane: it is how you go
-back. #key("Shift-Esc") needs the kitty keyboard protocol or the GUI;
-elsewhere it is a plain Esc. "The previous pane" is the last other pane on
-the jump list, else the next pane down its column. #key("Ctrl-w") then
-#keys("h", "j", "k", "l") moves the keyboard to the pane left, below,
-above or right; #keys("Ctrl-o", "Ctrl-i") walk back and forward through the
-places you have jumped to, the jump list. In raw mode every key but #key("Ctrl-b"), Esc and the
-paste chords goes to the program, so #key("Ctrl-w") and #key("Alt-n") need
-you out of raw mode first.
+#key("Shift-Esc") needs the kitty keyboard protocol or the GUI; elsewhere
+it is a plain Esc. The previous pane is the last other pane on the jump
+list, else the next pane down its column.
+
+#pairs(
+ [#key("Ctrl-w") #key("h")], [the keyboard to the pane on the left; #key("j") below, #key("k") above, #key("l") right],
+ [#keys("Ctrl-o", "Ctrl-i")], [back and forward through the places you jumped to (the jump list)],
+)
+
+Raw mode sends every key but #key("Ctrl-b"), Esc and the paste chords to
+the program: leave it before #key("Ctrl-w") or #key("Alt-n").
= The mouse <mouse>
@@ -62,21 +62,22 @@ you out of raw mode first.
btn("B1"), [select; a click puts the cursor there and gives the pane the keyboard. In a tag it starts typing, in insert mode. A double click selects the word; at a line's start or end, the line; just inside a bracket or quote, up to its match.],
btn("B2"), [#word("Exec"): a builtin word runs, anything else is a shell line.],
btn("B3"), [#word("Look"): open the file, address, directory or URL, else find the word's next place.],
+ chord("B1", "B2"), [cut the selection],
+ chord("B1", "B3"), [paste over it],
+ chord("B1", "B2", "B3"), [copy],
)
With one button, as on a trackpad, Alt-click (Option on a Mac) is #btn("B2") and Super-click (Cmd) is #btn("B3"), sweeps included; Ctrl-click stays the language server's definition, a program that takes the mouse gets the plain click, and in a terminal only Alt-click works, since Super never reaches pardes there.
-A middle- or right-click with no drag takes the word under it: the
-run of letters, digits and `. - + / : @ _ ~`, a trailing `:` dropped. So
#btn("B3") on `src/bar.c:12:5:` in a compiler's error opens `src/bar.c` at
-line 12, column 5. Drag to say exactly what you mean. #key("Enter") and
-#key("Tab") in normal mode are #word("Look") and #word("Exec").
+line 12, column 5: a click with no drag takes the run of letters, digits
+and `. - + / : @ _ ~` under it, a trailing `:` dropped. Drag to say
+exactly what you mean. #key("Enter") and #key("Tab") in normal mode are
+#word("Look") and #word("Exec").
-Hold the left button and click the middle one to cut the selection, the
-right one to paste over it, both one after the other to copy. #key("y") yanks and
-#key("p") pastes after (a line yanked with #key("x") #key("y") goes in as a
-new line below), through registers every pane shares; #key("SPC y") and
-#key("SPC p") use the system clipboard.
+#key("y") yanks and #key("p") pastes after (#key("x") #key("y") then
+#key("p") puts the line in below), through registers every pane shares;
+#key("SPC y") and #key("SPC p") use the system clipboard.
= Tags <tags>
@@ -84,19 +85,19 @@ new line below), through registers every pane shares; #key("SPC y") and
#tag("New Tty Find Grep Joincol Delcol")
#tag("Save Tty Collapse Del", path: "/home/me/notes.txt")
-A tag is text with undo: type a word into it and click it, or delete the
-defaults. #key(":") moves the keyboard to the tag, onto its #word("Save")
-the first time, in normal mode (#key("Tab") runs it), and back. Any word
-runs from any tag: #word("Exit") in a pane's tag quits too. The path
-at the start of a pane's tag is computed: typing into it drafts a new name,
-#key("Enter") confirms and the next #word("Save") writes there.
+A tag is text with undo: type `make` into one and #word("Exec") it, or
+delete the words you never use. #key(":") moves the keyboard onto the
+tag's #word("Save") the first time (#key("Tab") runs it), and back. Any word runs from any
+tag: #word("Exit") in a pane's tag quits too. Edit the path to
+`/home/me/notes2.txt` and press #key("Enter"): the next #word("Save")
+writes there.
#word("Collapse") folds a pane to its tag. Drag the grip up or down to
resize, or onto another column to move the pane.
= Where commands run and panes go <command-panes>
#btn("B2") on a line that is no builtin (`make`, `git log`) runs it with
-the #word("Shell") setting's `-c`. Where depends on where you clicked:
+the #word("Shell") setting's `-c`, by where you clicked:
#pairs(
[a terminal's text or tag, at a prompt with nothing typed], [typed into that shell, in its current directory],
@@ -105,58 +106,58 @@ the #word("Shell") setting's `-c`. Where depends on where you clicked:
[the workspace tag], [a command pane in the session's directory, in the last column],
)
-The keyboard stays where it was. A file's tag runs in the file's directory,
-so run project commands (`make`) from a column or the workspace tag, or a
-shell. A command pane's tag says `running`, then `exit N`:
+So run `make` from a column or the workspace tag, not a file's. The
+keyboard stays where it was, and the command pane's tag ends in `running`,
+then `exit N`:
#tag("Kill Save Collapse Del", path: "/home/me/src (make) exit 0")
The next command for that directory reuses a finished command pane.
-#word("Kill") stops what pardes started (#word("Kill") `make`: those whose line
-starts with `make`); #word("Exit") quits pardes. A pane word from a column
-tag (#word("Save"), #word("Del")) acts on that column's pane with the
-keyboard, or its first.
+#word("Kill") `make` stops what pardes started whose line starts with
+`make`; #word("Exit") quits pardes. #word("Save") or #word("Del") in a
+column tag acts on that column's pane with the keyboard, or its first.
Every other new pane goes into the *active column*: the column you last
typed or left-clicked in, or the one that got the last new pane. It
takes the keyboard, except a listing, which opens below the pane that
asked and leaves it the keyboard, so #keys("n", "N") walk the listing.
-#word("Look") moves the keyboard but not the active column: #btn("B3") on a file
-already open in another column jumps there, and the next new pane still
-lands in the old column until you type or click. #word("Placement")
-`pardes` picks other rules (#doc("reference", section: "placement")).
+#btn("B3") on a file open in another column jumps there, but the next new
+pane still lands in the old column until you type or click.
+#word("Placement") `pardes` picks other rules (#doc("reference", section: "placement")).
-A column can be empty: closing its last pane leaves it. #word("Delcol")
-and #word("Joincol") take columns away. Closing the session's last pane
-quits pardes.
+Closing a column's last pane leaves it empty; #word("Delcol") and
+#word("Joincol") take columns away. Closing the session's last pane quits
+pardes.
= Look <looking>
-#btn("B3") (or #key("Enter")) on a path opens it, or goes to the pane that
-already shows it; `file:12` goes to line 12, `file:/re/` to the next
-match of `re`, and the other address forms are on the cheatsheet.
-#key("/"), text and #key("Enter") list the lines holding it in a `+Search`
-and go to the first; #keys("n", "N") step through the rest. A directory types `ls` into a terminal idle there,
-else opens one there. A URL opens in the browser. A relative path is
-found in the directory of the pane the #word("Look") came from, then of each
-pane on the jump list, most recent first.
+#pairs(
+ addr("notes.txt"), [opens it, or goes to the pane already showing it],
+ addr("notes.txt:12"), [line 12],
+ addr("notes.txt:/TODO/"), [the next match of `TODO`],
+ addr("src/"), [`ls` typed into a terminal idle there, else a new terminal there],
+ addr("https://ziglang.org"), [the browser],
+)
+
+#key("Enter") does the same from the keyboard; the other address forms are
+on the cheatsheet. A relative path is found in the directory of the pane
+the #word("Look") came from, then of each pane on the jump list, most
+recent first.
-#word("Find") `name` lists the files below the pane's directory whose
-names hold it; #word("Grep") `text` lists the lines that hold the text,
-literally (no regular expression), under every pane's directory. Both land
-in a `+Search` listing; their limits are in the reference.
+#pairs(
+ [#key("/") `TODO` #key("Enter")], [a `+Search` of the lines holding `TODO`, the cursor on the first; #keys("n", "N") step through],
+ [#word("Find") `conf`], [a `+Search` of the files below the pane's directory with `conf` in their names],
+ [#word("Grep") `TODO`], [a `+Search` of the lines holding `TODO`, literally, under every pane's directory],
+)
= Unsaved panes <unsaved-panes>
-A pane with unsaved text is marked on its grip. #word("Del") on it refuses
-once: the message row says `1 unsaved pane — Del again to discard` and the
-pane is listed in `+Unsaved`. The same #word("Del") again discards it.
-#word("Exit"), #word("Restore") and #word("Delcol") refuse once the same
-way. A pane with nothing unsaved closes at once. From the keyboard
-(#key("SPC d")), #word("Del") between two panes also asks which takes its
-rows: #key("k") above, #key("j") below. To quit, press #key("SPC q") or
-middle-click #word("Exit") in the workspace tag; it refuses once
-over unsaved panes too.
+#word("Del") on a pane with unsaved text (marked on its grip) refuses
+once, saying `1 unsaved pane — Del again to discard`, and lists the pane
+in `+Unsaved`; #word("Del") again discards it.
+#word("Exit") (or #key("SPC q")), #word("Restore") and #word("Delcol")
+refuse once the same way. #key("SPC d") between two panes also asks which
+takes the rows: #key("k") above, #key("j") below.
= Terminals <terminals>
@@ -174,42 +175,49 @@ over unsaved panes too.
#btn("B2") and #btn("B3") stay pardes's. Hold Shift to swap.
- #word("Repl") `python` in its tag makes #btn("B2") on a `.py` pane send the text
to that REPL.
-- Paged output (`git log`, `man`) opens in a `+Pager` pane (#doc("setup", section: "pager")).
+- `git log` and `man` open in a `+Pager` pane (#doc("setup", section: "pager")).
= Reviewing diffs <reviewing-diffs>
-Open a `.diff` or `.patch`, or run `git diff` as a command: the output is
-drawn as a diff, each hunk coloured in its file's language. #btn("B3") on a
-`diff --git`, `---` or `+++` line opens the file; on `@@` the hunk's first
-new line; on a hunk line's `+`, `-` or space, that line in the new file.
+`git diff` run as a command, or a `.diff` or `.patch` opened, is drawn as
+a diff, each hunk in its file's language. #btn("B3") on:
+
+#pairs(
+ [`diff --git`, `---`, `+++`], [the file],
+ [`@@ -3,7 +3,8 @@`], [the hunk's first new line],
+ [a line's `+`, `-` or space], [that line in the new file],
+)
= `pardes FILE` and `--wait` <editor>
-In a pane's shell, `pardes FILE` opens FILE in this session and returns at
-once, as acme's `B` does; a FILE not there yet opens an empty pane that
-#word("Save") creates. `pardes --wait FILE` returns when that pane is
-closed, as acme's `E` does, which makes it an `EDITOR`
-(#doc("setup", section: "editor-setup")). Refusals and `--nested` are in
-the reference.
+In a pane's shell:
+
+```
+pardes notes.txt open it here and return at once (acme's B)
+pardes --wait notes.txt return when that pane closes (acme's E)
+```
+
+A file not there yet opens empty, and #word("Save") creates it.
+`--wait` makes pardes an `EDITOR` (#doc("setup", section: "editor-setup"));
+refusals and `--nested` are in the reference.
= Keys <keys>
-Motions select what they cross, and an edit acts on the selection: #key("w")
-then #key("d") deletes a word. #key("x") selects lines, #key("v") extends,
-#key(";") collapses to the cursor. #key("s") makes a cursor per regex match
-and every edit acts at each. #key("/") is a substring search; the regexes
-are on #key("s") and #key("S"). #keys("n", "N") step through everything
-#word("Look") would open, across panes. Line end is #key("g l"). #key("SPC") starts
-the leader, #key("SPC ?") lists every path, #word("Help") every key and
-builtin, and #word("Tutor") (#key("SPC h t")) practises them. The language
-keys (#keys("g d", "g r"), `SPC l`) work once a server is installed
-(#doc("setup", section: "language-servers")).
+#pairs(
+ [#key("w") #key("d")], [select a word, delete it: motions select, edits act on the selection],
+ [#key("x"), #key("v"), #key(";")], [select the line; extend; collapse to the cursor],
+ [#key("s")], [a cursor per regex match; every edit acts at each],
+ [#key("/"), #keys("n", "N")], [substring search; step through everything #word("Look") would open, across panes],
+ [#key("g l")], [line end],
+ [#key("SPC ?")], [every leader path; #word("Help") every key and builtin; #word("Tutor") (#key("SPC h t")) practises them],
+ [#keys("g d", "g r"), `SPC l`], [the language keys, once a server is installed (#doc("setup", section: "language-servers"))],
+)
-The normal and insert keys are helix's, and helix's
+The keys are helix's, and helix's
#link("https://docs.helix-editor.com/keymap.html")[keymap] is their full
-reference. pardes's own keys and where it differs from helix
-(#key("Esc") leaving the pane, the #key("SPC") paths, #key("Ctrl-w"),
-#key("Ctrl-b")) are in this guide and on the cheatsheet (#doc("cheatsheet")).
+reference. Where pardes differs (#key("Esc") leaving the pane, the
+#key("SPC") paths, #key("Ctrl-w"), #key("Ctrl-b")), this guide and the
+cheatsheet (#doc("cheatsheet")) say so.
= Sessions <sessions>
@@ -218,10 +226,10 @@ pardes --detach=work & a session with no screen of its own
pardes --attach=work show it here
```
-The session owns the panes, shells and files; frontends come and go.
-#word("Attach") `work` (#key("SPC s a")) switches this window to it, and
-#word("Detach") (#key("SPC s D")) leaves it running. Every attached frontend
-sees the same screen.
+The session owns the panes, shells and files; frontends come and go, and
+all of them see the same screen. #word("Attach") `work` (#key("SPC s a"))
+switches this window to it; #word("Detach") (#key("SPC s D")) leaves it
+running.
= Config <config>
@@ -235,6 +243,6 @@ Shell zsh
```
#word("DumpConfig") opens every live setting as the line that sets it.
-#word("Dump") saves the workspace and #word("Restore") brings it back; what
-a dump keeps is in the reference. Keys are compile-time, in
+#word("Dump") saves the workspace and #word("Restore") brings it back
+(what a dump keeps is in the reference). Keys are compile-time, in
`src/config.zig`.
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ
index 71005349..1ae38767 100644
--- a/docs/typ/reference.typ
+++ b/docs/typ/reference.typ
@@ -20,8 +20,8 @@ it names, or else run it as a shell line. The files #file("look") and
README the one-screen summary (src/fs-help.txt) @other-files
index a line per pane: serial kind dirty name column @rules
status pid, version, panes @other-files
-look write a line: a right click at the pane with the keyboard; read: the serials touched @look-and-exec
-exec write a line: a middle click there; read: the serials touched @look-and-exec
+look write a line: a #word("Look") at the pane with the keyboard; read: the serials touched @look-and-exec
+exec write a line: an #word("Exec") there; read: the serials touched @look-and-exec
pager write a directory: its one +Pager, made or emptied; read: its serial @pardes-stdin
log the event log; write follow to wait for more @log
screen the rendered screen as JSON @on-screen
@@ -56,8 +56,8 @@ pane/ the panes @pa
scroll 0 or 1; a write scrolls the pane @flags
errors write-only: text for the directory's +Errors @panes
event the pane's clicks and keys, as acme's event file @event
- look a right click at this pane @look-and-exec
- exec a middle click at this pane @look-and-exec
+ look a #word("Look") at this pane @look-and-exec
+ exec an #word("Exec") at this pane @look-and-exec
tagexec a word clicked in this pane's tag @look-and-exec
pty/ terminals only @pty
ctl winsize, sig, exec @pty
@@ -216,7 +216,7 @@ files.
that is there but will not open fails the write and is named:
`look: <path>: permission denied`. A zero column is refused, `file:0:0`
included: columns count from 1.
-- A whole line of a diff pane written to #file("look") is the look a right-click on its first column makes. The line is matched in the
+- A whole line of a diff pane written to #file("look") is the #word("Look") on its first column. The line is matched in the
pane from its cursor row on, wrapping, and the first match wins.
- On a PDF pane `:P:H` is hit H of the pane's search on page P, as
`file.pdf:P:H` is; a hit not there, or any H with no search active, is a
@@ -744,7 +744,7 @@ back as a record: run it through #file("ctl") instead.
== REPLs <repls>
#word("Repl") `python` on a terminal's #file("ctl") (or in its tag) binds it as
-that language's REPL: a middle-click or #key("Tab") on a `.py` body
+that language's REPL: #word("Exec") (or #key("Tab")) on a `.py` body
then types the text into the REPL instead of running it; builtin words,
tag words, #word("Exec") `<text>` and #raw("@`cmd`") words still run. #word("Repl")
takes the languages a code fence names (ada, bash, c, c_sharp, clojure,
diff --git a/docs/typ/scripting.typ b/docs/typ/scripting.typ
index 73c4aefd..47eb8a24 100644
--- a/docs/typ/scripting.typ
+++ b/docs/typ/scripting.typ
@@ -3,21 +3,30 @@
// reference.
#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs
-Every session is a virtual filesystem, served over 9P, as acme's is: its
-panes, columns and tags are files. `cat`, `echo >` and `ls` are the whole
-interface, and a program that opens
-files is an extension. The reference (#doc("fs")) has every file.
+Every session is a virtual filesystem, served over 9P, as acme's is, so
+a program that opens files is an extension:
+
+```
+$ ls $m
+README col commands ctl exec focus index layout listeners log
+look os pager pane recent screen status tag tagexec
+$ cat $m/index
+1 term 0 /home/me/src 1
+2 text 0 /home/me/src/+New 1
+```
+
+The reference (#doc("fs")) has every file.
= Finding the session <find-the-session>
-Shells and command panes in a session get `PARDES_9P` (its socket) and
-`PARDES_PANE` (their own pane's serial). A command run from a pane's tag
-or text also gets `$winid`, the serial of the pane it was clicked in, as
-acme's commands do (unset from a column's or the workspace's tag).
+#pairs(
+ [`PARDES_9P`], [the session's socket, in every shell and command pane],
+ [`PARDES_PANE`], [the serial of the pane the shell runs in],
+ [`$winid`], [the serial of the pane a command was clicked in, as in acme (unset from a column's or the workspace's tag)],
+ [`PARDES_MOUNT`], [the session as a directory, under `9ns --mntgen` (#doc("setup", section: "ninens"))],
+)
-Under `9ns --mntgen` (see setup) every pane also gets `PARDES_MOUNT`, the
-session as a directory. That is the session line every recipe here starts
-from:
+Every recipe here starts from this line:
#cmd("m=${PARDES_MOUNT:-}\ncat \"$m/index\"")
When it is empty (no mount), plan9port's `9p` talks to the socket instead:
`cat $m/x` is `9p -a "unix!$PARDES_9P" read x`, and `echo y > $m/x` is
@@ -25,10 +34,8 @@ When it is empty (no mount), plan9port's `9p` talks to the socket instead:
= Your first tag word <first-tag-word>
-A script on `PATH` is a word you can click: command panes inherit pardes's
-environment. This `Fmt` runs `gofmt` on the Go file whose tag it was
-clicked in and reloads the pane. It finds the pane through `$winid`, not
-`PARDES_PANE`, which is the command pane it runs in:
+A script on `PATH` is a word you can click. This `Fmt` finds its pane
+through `$winid` (`PARDES_PANE` is the command pane it runs in):
```sh
#!/bin/sh
@@ -43,11 +50,9 @@ else
fi
f=$(rd pane/$n/name) # the file it shows
case $f in *.go) ;; *) echo "Fmt: $f is not Go" >&2; exit 1 ;; esac
-echo Save | wr pane/$n/ctl && gofmt -w "$f" && echo get | wr pane/$n/ctl
+echo Save | wr pane/$n/ctl && gofmt -w "$f" && echo get | wr pane/$n/ctl # get: reload
```
-`get` on a pane's ctl reloads its text from the file on disk.
-
Type `Fmt` into a Go pane's tag and #word("Exec") it (middle-click: run
the builtin a word names, or else run it as a shell line); its output
shows in a command pane. To have `Fmt` in every Go file's tag, follow the
@@ -99,10 +104,8 @@ the text names, or else find it): they arrive as acme's records instead of actin
record back has pardes do it. A record is a line, `MX31 36 1 5 Upper`: who
(`M` mouse, `K` keyboard, `E` or `F` a write to a file), what (`X` #word("Exec") or `L` #word("Look")
in the body, `x` `l` in the tag), the range, a flag, the text's length and
-the text (#doc("fs", section: "event")). This helper
-gives pane `$1` the tag words `Upper` (upper-case the selection) and
-`Done`; every other click is written back, and when it ends the pane's
-clicks are pardes's again:
+the text (#doc("fs", section: "event")). This helper owns the tag words
+`Upper` and `Done` in pane `$1` and writes every other click back:
```bash
#!/bin/bash
@@ -147,7 +150,12 @@ exec 3<&- # let event go: clicks act again
= An isolated session
-Never experiment on a session someone is using. Strip every `PARDES_*`
-variable first, then `pardes --detach=NAME &` with its own `HOME` and
-`XDG_*` directories, and mount it with `9ns --mntgen` (it is
-`$NINE_MOUNT/pardes/NAME`). Stop it when done.
+Never experiment on a session someone is using. Under `9ns --mntgen`,
+start one with an empty environment and home, and quit it when done:
+
+```
+env -i PATH="$PATH" HOME="$(mktemp -d)" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" pardes --detach=try &
+m=$NINE_MOUNT/pardes/try
+cat $m/index
+echo Exit > $m/exec
+```
diff --git a/docs/typ/setup.typ b/docs/typ/setup.typ
index c7644dbb..1c3a616b 100644
--- a/docs/typ/setup.typ
+++ b/docs/typ/setup.typ
@@ -61,17 +61,16 @@ fi
= A pager <pager>
-`pardes -` reads its standard input into the directory's one `+Pager`
-pane, colours kept, and returns. With #word("Pager") `pardes` (the default) a
-terminal's shell gets `PAGER`, `GIT_PAGER` and `SYSTEMD_PAGER` set to it,
-and `SYSTEMD_PAGERSECURE=0`, each only where your environment does not set
-it. So `git log`, `journalctl` or `man` output arrives as a pane to search
-and click in, a diff drawn as one; command panes page through `cat`. `man`
-reads `MANPAGER` first, which pardes never sets. Any pager of your own wins;
-#word("Pager") `off` in the startup file keeps them all yours, for terminals started
-after it. git colours what it pages by default (`color.pager`); ask other
-programs for colour outright (`ls --color=always | pardes -`), and put
-#word("PagerColor") `off` in the init file for plain text.
+#cmd("ls --color=always | pardes - # into the directory's +Pager, colours kept")
+
+With #word("Pager") `pardes` (the default) a terminal's shell gets
+`PAGER`, `GIT_PAGER` and `SYSTEMD_PAGER` set to it (and
+`SYSTEMD_PAGERSECURE=0`) wherever your environment leaves them unset, so
+`git log`, `journalctl` and `man` arrive as a pane, a diff drawn as one;
+command panes page through `cat`. `man` reads `MANPAGER` first, which
+pardes never sets. #word("Pager") `off` in the startup file leaves them all
+yours, for terminals started after it; #word("PagerColor") `off` makes the
+text plain.
= yazi in a terminal pane <yazi>
@@ -105,9 +104,7 @@ script on that `PATH` is a word you can click.
= Language servers <language-servers>
-pardes starts a language server for a file it knows, finding the program
-on `PATH`; `PARDES_LSP_<LANG>` names another, and an empty value turns it
-off.
+pardes starts a language server for a file it knows, from `PATH`:
#pairs(
[`.zig`], [`zls` (`PARDES_LSP_ZIG`)],
@@ -118,6 +115,8 @@ off.
[`.py`], [`pyright-langserver --stdio` (`PARDES_LSP_PY`)],
)
+#cmd("PARDES_LSP_ZIG=$HOME/src/zls/zig-out/bin/zls pardes # another zls\nPARDES_LSP_PY= pardes # none for .py")
+
#word("Lspinfo") (#key("SPC l i")) says what is running.
= Fonts and themes <fonts-and-themes>
@@ -125,7 +124,7 @@ off.
The terminal build uses your terminal's font. The SDL window carries
Adwaita Mono and finds others in `/usr/share/fonts`,
`/usr/local/share/fonts`, `~/.local/share/fonts` and `~/.fonts`; #word("Font")
-`name:size` picks one. #word("Theme") `<name>` and #word("ThemeFile") are in the themes
+`Iosevka:16` picks one. #word("Theme") `<name>` and #word("ThemeFile") are in the themes
chapter (#doc("themes")).
= plan9port <plan9port>