diff options
Diffstat (limited to 'docs/typ')
| -rw-r--r-- | docs/typ/builtins-gui.json | 2 | ||||
| -rw-r--r-- | docs/typ/builtins-tty.json | 2 | ||||
| -rw-r--r-- | docs/typ/cheatsheet.typ | 6 | ||||
| -rw-r--r-- | docs/typ/guide.typ | 46 | ||||
| -rw-r--r-- | docs/typ/reference.typ | 28 |
5 files changed, 64 insertions, 20 deletions
diff --git a/docs/typ/builtins-gui.json b/docs/typ/builtins-gui.json index c238955c..88c9d864 100644 --- a/docs/typ/builtins-gui.json +++ b/docs/typ/builtins-gui.json @@ -51,7 +51,7 @@ {"name": "Forward", "leader": "SPC j i", "also": ["C-i"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-i: one step forward again, up to wherever Back started."}, {"name": "Get", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Get: the pane's file read again, its unsaved edits refused once as Del refuses them."}, {"name": "Grain", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off, 0-3", "doc": "The page takes a fine, still grain, like paper: a level, 0 (off) through 3."}, - {"name": "Grep", "leader": "SPC f g", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Find's sibling: Find matches file NAMES under this pane's directory, Grep matches file CONTENTS under every pane's directory at once."}, + {"name": "Grep", "leader": "SPC f g", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Find's sibling: Find matches file NAMES under this pane's directory, Grep matches the LINES of those files, on the disk engine's worker."}, {"name": "GripWidth", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The grip and scrollbar width, as a percent of the theme's rail."}, {"name": "Help", "leader": "SPC ?", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the help: every key and every builtin."}, {"name": "Hover", "leader": "SPC l k", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Ask the language server about the symbol under the cursor."}, diff --git a/docs/typ/builtins-tty.json b/docs/typ/builtins-tty.json index 791eef63..01ae6bc5 100644 --- a/docs/typ/builtins-tty.json +++ b/docs/typ/builtins-tty.json @@ -45,7 +45,7 @@ {"name": "FocusTint", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "The focused pane's and column's tags are tinted, on or off."}, {"name": "Forward", "leader": "SPC j i", "also": ["C-i"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-i: one step forward again, up to wherever Back started."}, {"name": "Get", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Get: the pane's file read again, its unsaved edits refused once as Del refuses them."}, - {"name": "Grep", "leader": "SPC f g", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Find's sibling: Find matches file NAMES under this pane's directory, Grep matches file CONTENTS under every pane's directory at once."}, + {"name": "Grep", "leader": "SPC f g", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Find's sibling: Find matches file NAMES under this pane's directory, Grep matches the LINES of those files, on the disk engine's worker."}, {"name": "Help", "leader": "SPC ?", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the help: every key and every builtin."}, {"name": "Hover", "leader": "SPC l k", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Ask the language server about the symbol under the cursor."}, {"name": "InactiveDim", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "Fade the unfocused panes' text by a percentage, 0 through 100, 0 off."}, diff --git a/docs/typ/cheatsheet.typ b/docs/typ/cheatsheet.typ index 7b140a04..76f4b866 100644 --- a/docs/typ/cheatsheet.typ +++ b/docs/typ/cheatsheet.typ @@ -59,7 +59,7 @@ Helix-style: motions *select*, then an edit acts on the selection. Mode box: bla [#keys("i", "a", "I", "A", "o", "O")], [insert; #key("Esc") back to normal], [#keys("s", "S")], [regex: a cursor per match, split], [#keys("C", ",")], [cursor on next line; keep primary], - [#keys("/", "n", "N")], [search, next, previous], + [#keys("/", "n", "N")], [search (a query pane), next, previous], [#keys("m i", "m m")], [textobject, matching bracket], [#key("|")], [pipe each selection through the shell], [#keys("g d", "g r")], [definition, references (language server)], @@ -87,6 +87,8 @@ Helix-style: motions *select*, then an edit acts on the selection. Mode box: bla key("SPC f f"), word("Find"), key("SPC f g"), word("Grep"), key("SPC f r"), word("Recent"), + key("SPC b b"), word("Panes"), + key("SPC s s"), [declarations], key("SPC f c"), word("Config"), key("SPC d"), word("Del"), key("SPC n t"), word("Tty"), @@ -119,7 +121,7 @@ Helix-style: motions *select*, then an edit acts on the selection. Mode box: bla `git diff` output is a diff: #btn("B3") on a file line, an `@@` or a line's `+`/`-` jumps there. #doc("tags", section: "reviewing-diffs") == Finding things -- #word("Find") `name`, #word("Grep") `text` (literal): a `+Search` listing. #word("Recent"): files lately. #word("Help"), #word("Tutor"). +- A query pane under the pane: line 1 the query, its first word the source: `/pat`, `Find name` (fuzzy), `Grep text` (literal), `Recent`, `Panes`, `Symbols`, `All`. #keys("Ctrl-n", "Ctrl-p") step, #key("Enter") lands and keeps the rows, #key("Esc") puts things back. #word("Help"), #word("Tutor"). == Sessions `pardes --detach=work`; `--attach=work` or #word("Attach") `work`; #word("Detach") leaves it running. #doc("detached") diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ index e60b4231..65c7334d 100644 --- a/docs/typ/guide.typ +++ b/docs/typ/guide.typ @@ -20,9 +20,9 @@ [the session's directory], [where pardes started, or the directory `pardes DIR` named; workspace and column tags run there], [active column], [where the next new pane goes (below)], [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], + [`+` names], [panes pardes makes, named in their directory: `+New` a scratch (text with no file yet), `+Search` a query pane or 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, #word("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 (#key("s")'s regex, #word("Save")'s path) with #key("Enter"), cancel it with #key("Esc")], ) = Modes <modes> @@ -166,11 +166,45 @@ 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. += Search <search> + +#key("/") opens a query pane under the pane: a `+Search` whose first line +is the query, typed into, and whose rows are what it finds, made again at +each key. It takes its rows from the pane it searches and from no other, +is born #word("SearchRows") rows tall and never resizes itself; nothing +found is a count of `0` in its tag, not an exit. + #pairs( - [#key("/") `TODO` #key("Enter")], [a `+Search` of the lines holding `TODO`, the cursor on the first; #keys("n", "N") select the next or previous match], - [#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], + [#key("/") `vw`], [every match in the text tinted and ticked on its scroll rail, the first after the cursor selected; the rows under line 1 are the lines holding it, a line number in the gutter, each under the declaration it is in], + [#keys("Ctrl-n", "Ctrl-p")], [the next or previous match, typing; the text follows it], + [#key("Enter")], [the keyboard on the match, the pattern in `/`, the rows kept as text (#word("Save") keeps them as a file)], + [#keys("n", "N")], [the next or previous match in the text, round the end without a word], + [#key("Esc")], [typing: the text as it was, the query pane closed], + [#key("*")], [the selection as line 1, the keyboard staying in the text], ) + +Line 1's first word names what it searches, and editing the word changes it: + +#pairs( + [`/pat`], [the pane's own text: a regex, any case unless it has a capital (#key("/"))], + [`Find name`], [the files below the pane's directory, by a fuzzy match of their names (#key("SPC f f"), #word("Find"))], + [`Grep text`], [the lines of those files holding `text`, literally (#key("SPC f g"), #word("Grep")); past 2000 lines #word("More") goes on], + [`Recent name`], [the files opened lately (#key("SPC f r"), #word("Recent"))], + [`Panes name`], [the open panes (#key("SPC b b"), #word("Panes"))], + [`Symbols name`], [the text's declarations (#key("SPC s s"))], + [`All pat`], [every open pane's text, its rows under each pane (#key("SPC /"))], + [`Refs`, `Def`, `Impl`, `Diagnostics`], [the language server's lists; their places in the text tinted as a `/`'s are, `]d` stepping the diagnostics], +) + +A row in a file no pane shows is shown in a `+Preview` under the query +pane, following #keys("Ctrl-n", "Ctrl-p") and #btn("B1"), never the +pointer; #key("Enter") makes the preview that file's pane where it stands. +#btn("B3") on a row's line number looks at the row; #btn("B2") on line 1 +runs it again. The next search from the same pane reuses its query pane, +its kept rows back on #key("Esc") (#word("SearchPane") `new`: a pane each; +#word("SearchPlace") `column`: in a finder column at the right). A PDF's +and a terminal's #key("/") still ask on the message row and list a +`+Search`. #clip("search") = Unsaved panes <unsaved-panes> @@ -281,7 +315,7 @@ refusals and `--nested` are in the reference. [#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; repeat the search in the current text, wrapping at the ends], + [#key("/"), #keys("n", "N")], [search the text in a query pane (#link(<search>)[Search]); step its matches, round the ends], [#keys("SPC j n", "SPC j p")], [#word("LookNext") / #word("LookPrev"): select locations across panes; #key("Enter") opens one], [#key("g l")], [line end], [`12G`], [line 12; a bare #key("G") does nothing], diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ index c14ad659..386b9f0f 100644 --- a/docs/typ/reference.typ +++ b/docs/typ/reference.typ @@ -909,7 +909,8 @@ at 200, ending in `…`. Control characters become spaces. pane from the root). - #file("/recent"): up to 200 files, PDFs and images, most recent first, `open <path>` or `closed <path>`; kept in `$XDG_STATE_HOME/pardes/recent`. - #word("Recent") shows them in a pane, an open one at its dot now and a + #word("Recent") lists them in a query pane (line 1 `Recent`, the rest + narrowing them by a fuzzy match), an open one at its dot now and a closed one at its last (a PDF's is its page); a #word("Look") of a row reopens it there. - #file("/status"): `pid`, `version`, `panes`. @@ -972,15 +973,22 @@ one a #file("exec") open still holds is never reused. In a command pane, #key("n = Find and Grep <find-grep> -#word("Find") matches file names, #word("Grep") the text of lines, both literally and -ignoring ASCII case. #word("Grep") reads whole files and stops at 512 -hits, #word("Find") at 512 names. The walk stops at 20000 files or 100000 entries, -16 deep, and passes over `.git`, `.jj`, `target`, `node_modules`, -`.venv`, `__pycache__`, `.zig-cache` and `zig-out`. A cap hit, or a -directory it could not open, is said at the end: `cut at 512 hits`, `walk cut at N entries`, `N -directories skipped: permission denied`. A search that finds nothing and -skipped nothing fails, `Grep: text not found`, and leaves the `+Search` as -it was. +Both fill the asking pane's query pane (#doc("guide", section: "search")), +line 1 `Find name` or `Grep text`, and run on a worker thread, never on +the loop that draws: `rg` when it is on `PATH` (`rg --files` and `rg --json +--fixed-strings --smart-case`, so `.gitignore` is honoured and hidden files +are passed over), else pardes's own walk, sorted, 16 deep, passing over +dot-directories, `.git`, `.jj`, `target`, `node_modules`, `.venv`, +`__pycache__`, `.zig-cache` and `zig-out`. #word("Find") lists the files once +and matches their names fuzzily at each key (the best first, 200 shown); +#word("Grep") matches the text of lines literally, any case unless the text +has a capital, once the typing pauses (80 ms), and stops at 2000 lines: +#word("More") (in the query pane's tag) goes on for 2000 more. A directory the +walk could not open is said under the rows: `N directories skipped: +permission denied`. A new query cancels the last; rows of a query no +longer asked never land. Written to #file("exec") (a script) the search runs +to its end before the write is answered, and one that finds nothing fails, +`Grep: text not found`, `Find: name not found`, its query pane's count `0`. = On screen <on-screen> |
