summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 00:35:15 -0300
committerGabriel Schneider <[email protected]>2026-11-05 01:17:28 -0300
commitd5158f6a69ce5a1af6372c140b07379ee0ba2446 (patch)
treeec722719840f59263e4b7dbc740681594b526274 /docs
parent3b31e0484bd06658f10cd9165b76cb1ca3b198bd (diff)
downloadpardes-d5158f6a69ce5a1af6372c140b07379ee0ba2446.tar.gz
pardes-d5158f6a69ce5a1af6372c140b07379ee0ba2446.zip
Text, edit, normal, look, Query and their readers: the second selection form msel (whole rows r0..r1, for search-result highlights) goes; a visited search result and a query preview's place line are an explicit vsel like any other, back from the line's end (to the result's location start, the line's start for ordinary path:line rows; to the start for a preview line), and every msel branch in the edit ops, the drawing, the terminal's position tracking and the chords goes (visible: the result's highlight covers its line's characters and newline cell instead of the whole row width, with the ordinary selection colours; y, d and c on it act on that range as after x, its newline included, so a yanked result pastes as a line); selections.md and the ; Alt-; X Alt-x rows of helix-keys.md no longer describe msel; Text's walked shape changes (wire semantics)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'docs')
-rw-r--r--docs/helix-keys.md8
-rw-r--r--docs/selections.md4
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/helix-keys.md b/docs/helix-keys.md
index 8cfd53ad..1d1058ef 100644
--- a/docs/helix-keys.md
+++ b/docs/helix-keys.md
@@ -218,14 +218,14 @@ found. Pure text math in `modal.zig`: `findTarget`, `matchBracket`,
| Key | Behavior | Notes | Status |
| --- | --- | --- | --- |
-| `;` | collapse selection to cursor | drops vsel/msel, cursor stays | helix-verified (phase 5) |
-| `Alt-;` | flip anchor and head | vsel: swap cursor ↔ anchor; msel: cursor to the other end (r0/r1 swapped to keep the cursor-at-r1 invariant) | helix-verified (phase 5) |
+| `;` | collapse selection to cursor | drops vsel, cursor stays | helix-verified (phase 5) |
+| `Alt-;` | flip anchor and head | vsel: swap cursor ↔ anchor | helix-verified (phase 5) |
| `Alt-:` | make every range point forward | helix `ensure_selections_forward` | helix-verified |
| `Alt-o`/`Alt-up`, `Alt-i`/`Alt-down`, `Alt-p`/`Alt-left`, `Alt-right`, `Alt-a`, `Alt-I`, `Alt-e`, `Alt-b` | walk the file's syntax tree from every range: grow to the enclosing node (and remember what it grew from), shrink back to that or to the first child, the previous / next sibling (anonymous ones included, so often a comma), every named sibling or child, the enclosing named node's end / start (stretching to it in select mode) | helix `expand_selection` and kin, on a whole-file parse (`File.node_tree`) made on the first such key after an edit and reused until the next; a range the tree says nothing about, and every range of a file without a grammar, stays. Checked against the installed hx on JSON (`normal.zig` test): the harness runs without grammars, so it only proves the plain-text no-op | helix-verified (plain text), hx-checked (JSON) |
| `]f [f ]t [t ]a [a ]c [c ]T [T ]e [e ]x [x`, `mi`/`ma` + `f t a c T e x` | function, class, argument, comment, test, entry, element: jump to the next one starting after the cursor / the previous one ending before it (count times; select mode stretches to it), or select the smallest one around the cursor, inside or around | helix `goto_ts_object` / `textobject_treesitter`, from helix's own `textobjects.scm` vendored in `vendor/queries` (MPL-2.0), with its `#eq?`/`#match?` predicates; `syntax.objectAt`/`objectNext` on the file's kept parse. Zig's query is helix's ported by hand to the zig grammar pardes builds, and a node that ends in its line's newline (that grammar's comments) is taken without it, as helix's grammars have it. Grammars without a query (fortran, markdown, powershell) or whose query does not compile against pardes's grammar (erlang) have none, and the keys do nothing there. Checked against the installed hx on Python, JSON and Zig (`normal.zig` test) | hx-checked |
| `%` | select whole buffer | vsel anchor 0,0, cursor on the buffer's last char | helix-verified (phase 5) |
-| `X` | snap selection to line bounds | vsel → msel over its row span; bare cursor → 1-line msel; msel: already line-wise, no-op | helix-verified (phase 5) |
-| `Alt-x` | shrink selection to line bounds | vsel only: partial first/last lines drop out; nothing left collapses the selection; msel: no-op | helix-verified (phase 5) |
+| `X` | snap selection to line bounds | the selection's rows, whole, in its direction; a bare cursor its one line | helix-verified (phase 5) |
+| `Alt-x` | shrink selection to line bounds | partial first/last lines drop out; nothing left collapses the selection; one line: no-op | helix-verified (phase 5) |
### Multiple cursors
diff --git a/docs/selections.md b/docs/selections.md
index 0817c215..ee796cde 100644
--- a/docs/selections.md
+++ b/docs/selections.md
@@ -15,8 +15,8 @@ desktop, 64 on the board).
- The PRIMARY is where the cursor always was: `cur_row`/`cur_col` is the
head, `vsel.row`/`vsel.col` the anchor while `vsel.active`, and a bare
- cursor (inactive `vsel`) is the one-character range under it. `msel` is
- the older whole-line form (`r0`..`r1`), kept for search-result highlights.
+ cursor (inactive `vsel`) is the one-character range under it. A visited
+ search result is a range like any other: its line, selected back from its end.
- The others are `sels[0..nsel]`, in room allocated when a second range
appears and given back when the selection is one range again (a column's
or the workspace's tag allocates from `Text.gpa`, any other text from its