From a99edf403dbcebae2ce557e2ba39078ffe876a92 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 12:48:17 -0300 Subject: Builtins are written by name: each chapter and the tutor define Look and Exec once and then say Look and Exec; the cheatsheet draws every mouse button as its icon; one-button clicks (Alt is B2, Super is B3) are in the guide and cheatsheet; building says how to send patches to the list Co-Authored-By: Claude Opus 5.5 --- docs/typ/guide.typ | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'docs/typ/guide.typ') diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ index 7144c249..d07ab6cd 100644 --- a/docs/typ/guide.typ +++ b/docs/typ/guide.typ @@ -3,9 +3,10 @@ // keys on the cheatsheet. #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. Right-click any text to *look* at it: open the `file:line`, address or URL it names, or -else find the text. Middle-click it to *execute* it: run the -builtin it names, or else run it as a shell line. Everything else is where +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 @@ -19,7 +20,7 @@ session is also a virtual filesystem, served over 9P, for scripts. [command pane], [a terminal that runs one command line and shows its output], [`+` names], [panes pardes makes, named in their directory: `+New` a scratch (text with no file yet), `+Search` a listing of places, `+Pager` paged text, `+Errors` output, `+Unsaved` the panes holding unsaved text], [serial], [a pane's number, never reused: the `3` in `@p3:12` and in 9P paths], - [message row], [the line where pardes says what happened, and asks: answer a prompt (a search, Save's path) with #key("Enter"), cancel it with #key("Esc")], + [message row], [the line where pardes says what happened, and asks: answer a prompt (a search, #word("Save")'s path) with #key("Enter"), cancel it with #key("Esc")], [the box], [left of a pane's tag: drag it to move or resize the pane; it shows the mode, and marks unsaved text (`*`, or filled in the window)], ) @@ -59,15 +60,17 @@ you out of raw mode first. #pairs( 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"), [execute: a builtin word runs, anything else is a shell line.], - btn("B3"), [look: open the file, address, directory or URL, else find the word's next place.], + 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.], ) +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 look and execute. +#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 @@ -109,7 +112,7 @@ shell. A command pane's tag says `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 (`Kill make`: those whose line +#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. @@ -117,8 +120,8 @@ 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. A -look moves the keyboard but not the active column: #btn("B3") on a file +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")). @@ -127,7 +130,7 @@ 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. -= Looking += Look #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 @@ -135,7 +138,7 @@ 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 -looked for in the looking pane's directory, then in the directory of each +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 @@ -160,7 +163,7 @@ over unsaved panes too. #tag("Tty+bash Save Mode Filter Collapse Del", path: "/home/me/src") - #word("Tty") opens a terminal in the pane's directory, #key("Alt-n") one in - the session's directory; `Tty+bash` picks the shell. + the session's directory; #word("Tty+bash") picks the shell. - #word("Del") closes a terminal and its shell at once, running or not, and a shell that exits closes its pane. - #word("Save") writes the scrollback to a path it asks for. @@ -169,7 +172,7 @@ over unsaved panes too. - In raw mode Ctrl-V types what you yanked, Ctrl-Shift-V the clipboard. - A program that tracks the mouse gets #btn("B1") and the wheel; #btn("B2") and #btn("B3") stay pardes's. Hold Shift to swap. -- `Repl python` in its tag makes #btn("B2") on a `.py` pane send the text +- #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")). @@ -195,8 +198,8 @@ 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 a -look would open, across panes. Line end is #key("g l"). #key("SPC") starts +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 -- cgit v1.3