diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/config.md | 7 | ||||
| -rw-r--r-- | docs/fs.md | 40 |
2 files changed, 34 insertions, 13 deletions
diff --git a/docs/config.md b/docs/config.md index bc4acf12..35f0b6e7 100644 --- a/docs/config.md +++ b/docs/config.md @@ -34,8 +34,11 @@ not stop later ones. Text that is no builtin is not run as a shell command `Config` (`SPC f c`) opens `init` itself in a pane, or goes to its pane when it is open. With no file there yet, the pane is named for it, empty, and Save writes it, making its directory first. `DumpConfig` opens a -`+DumpConfig` pane with the startup path (a right click opens it) and every -live setting; a setting the frontend cannot show reads `unsupported`. The +`+DumpConfig` pane with every live setting, each line the word that sets +it and its value (`Shell /bin/bash`, `PanelSlide off`, `LocationsConfig …`) +and `unsupported` for one the frontend cannot show. After a blank line +come what is in effect but set by no word, such as the last shell spawned +and the font in use, and the startup path (a right click opens it). The root `ctl` file reads the settings back in the words a write takes ([fs.md](fs.md#the-root-ctl)). @@ -18,9 +18,11 @@ and `PARDES_PANE` (their pane's serial). **Forwarding.** `pardes FILE` run in a pane (a live `PARDES_PID`, with `PARDES_9P` and `PARDES_PANE`) writes FILE to that pane's `look` and returns -at once, as acme's `B` does. FILE must already exist; a name that does not -resolve, or a missing `PARDES_9P`/`PARDES_PANE`, starts a separate editor -instead. Bare `pardes` in a pane refuses and names `--nested`. +at once, as acme's `B` does. A FILE not there yet (`pardes notes/new.txt`) +opens a new pane named for it, empty, and its Save creates the file, making +its directories first when they are not there either. A missing +`PARDES_9P`/`PARDES_PANE` starts a separate editor instead. Bare `pardes` in +a pane refuses and names `--nested`. `--wait` (`-w`) returns when the pane that shows FILE is deleted (exit 0) or the session goes away (exit 1), as acme's `E` does. Use @@ -156,7 +158,8 @@ fails at the close if it never ends (``unmatched `{'``). A line held past 1 MiB is refused. **Answers.** Reading `look`, `exec` or `tagexec` answers the serials the -last command made, or else the pane it acted on or focused, one a line. An +last command made, or else the pane it acted on or focused, one a line; +nothing when it did none of these (`Newcol` at `/tagexec`). An open that wrote reads its own last answer; an open that never wrote reads the session's last. A read is a stream: once read, the next read on that fid is EOF until the next write (or seek to 0). With other clients about, @@ -208,10 +211,19 @@ A line written to `exec` is a middle click: - a builtin word runs (`/commands` lists them): `Save`, `Del`, `New`, `Tty [shell]`, `Msg text`, `Find`, `Grep`, `Edit ...`, `Mount`, ... A builtin that needs its argument (`Msg`, `Mount`, `Find`) written bare is - `wrong #args in control message "Msg"`. + `wrong #args in control message "Msg"`, and so is one that takes none + written with one (`Config extra`). +- the language server's words ask about a file pane's text at its cursor + (set it with `addr` and `dot=addr` first): `Hover` fills `+Hover`, + `Rename new` renames the symbol everywhere and lists the places, + `Diagnostics` and `Symbols` list the file's in `+Search`, `Lspinfo` says + which server serves the file and its state, and `Lspwhy` narrates the + last query step by step (in `+Lsp`), to tell why it found nothing. The + write returns once the answer is in; a pane with no file is refused. - acme's words run as pardes's where it has one (`Put` is `Save`, `Delete` a `Del` that does not ask); the rest (`Get`, `Putall`, `Snarf`, `Cut`, - `Paste`, `Zerox`, `Sort`, `Load`, `ID`, `Send`) are refused, `invalid: + `Paste`, `Zerox`, `Sort`, `Load`, `ID`, `Send`, `Tab`, `Indent`, `Local`, + `Incl`, `Abort`) are refused, `invalid: acme's Get is not a pardes builtin: ...`, never run as commands. So is a GUI-only builtin (`Fonts`) on another frontend. - anything else is a command line, at most 1024 bytes. At a terminal idle @@ -311,7 +323,8 @@ makes one, and closing its last pane leaves it (the keyboard goes to its tag, `focus` reads empty, the log says only `del`). Closing the session's last pane quits pardes. The log says `newcol <serial>` and `delcol <serial>`. -`tag` files (`/tag`, `/col/<n>/tag`, `/pane/<n>/tag`) read the whole tag. +`tag` files (`/tag`, `/col/<n>/tag`, `/pane/<n>/tag`) read the whole tag, +with no newline after it. A pane's starts with its computed path (an image's with its mode words, a PDF's with its page), then the editable text. `>` replaces the editable text (the default words too: `echo Make > tag` leaves only `Make`) and drops the @@ -320,7 +333,10 @@ blank matters; `echo` would start a second line). A pane tag may hold several lines; a column or workspace tag is one, a newline written into it becoming a space. Control characters other than tab, DEL, C1 controls and non-UTF-8 bytes are refused (`invalid tag text`). The editable text is at -most 4096 bytes (`tag: no space: over 4096 bytes`, ENOSPC). A clear is an ordinary edit +most 4096 bytes (`tag: no space: over 4096 bytes`, ENOSPC). All three kinds +take the same checks, whole or not at all, and a `>` whose write is refused +changes nothing: its truncation is done with the write that fits, or at the +close (or a read) when none came. A clear is an ordinary edit and `u` in the tag undoes it. [tags.md](tags.md) covers tags on screen. ## Panes @@ -338,7 +354,8 @@ are ENOSPC, for this open and for a look, exec, `New` or `Tty` alike. **`name`** reads the file name (a terminal's directory); a write renames the buffer (relative to the pane's directory) and marks nothing dirty; `Save` -then writes under the new name. A name is one line; refused (EINVAL) are a +then writes under the new name, making its directories first when the name +went into one not there. A name is one line; refused (EINVAL) are a second line, a blank at either end, control bytes and non-UTF-8 (`bad character in file name: a blank at its start`, ...). Up to 255 bytes a component. @@ -452,8 +469,9 @@ The same code (`src/regexp.zig`) serves addresses, Edit, and normal mode's submatches, so Edit's `s` has no `\1`-`\9`. - A pattern holding `\n` runs over the whole text: there `^` may only come first and `$` only just before a `\n`, else it is refused. -- An alternation must anchor every branch or none (`^def|^ ` works, - `^def|x` is refused). +- An alternation must anchor every branch with `^` or none (`^def|^ ` + works, `^def|x` is refused: `an alternation anchors every branch with ^ + or none`). A `$` does not count: `foo$|bar` is fine. - A class may hold non-ASCII runes (`[éa-z]`, a range up to 256 runes); a wider range or a negated class with one (`[^é]`) is refused. - At most 512 operations (about 512 characters, counted after that |
