Make marks and counts work, and the completion popup a setting

Marks: the engine read `ma` and `'a`, but the canvas example only said
they'd come later. It now sets and jumps to marks, and `''` goes back to
where the cursor was before the last jump (a mark, gg, G or :find).
Which-key lists `'` after `'`.

Counts on operators now mean something on nodes: `3dd` deletes this node
and the next two siblings, with their branches, the way vim's `3dd`
deletes three lines (Document::siblings_from). Counts before the operator
and before the target still multiply, and which-key now says what they
add up to: after `2d3`, the `d` entry reads "6 nodes: this one and the
next 5 siblings, with their branches".

The completion popup can now wait for Tab, like vim's wildmenu: the
`completion_popup` setting is "as-you-type" (the default) or "on-tab".
The config file comes with the app core; until then the example takes
`:set completion_popup=on-tab`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
skkeyeandClaude Opus 5.5 committed 2026-10-01 04:17:41 -04:00
1 parent bfc184f5ef
commit 57ba2c275d
6 files changed
+199 -35

No files matched your search

+3 -1
View File
@@ -115,7 +115,9 @@ impl CharKey {
pub fn hints(self) -> &'static [(&'static str, &'static str)] {
match self {
CharKey::SetMark => &[("a–z", "mark this node"), ("A–Z", "mark it, across documents")],
CharKey::JumpToMark => &[("a–z A–Z", "go to that mark")],
CharKey::JumpToMark => {
&[("a–z A–Z", "go to that mark"), ("'", "back to where you were before the last jump")]
}
_ => &[("any key", "the character to go to")],
}
}