Search every document (stage 9d)

<Space>/ (the user's pick), or :search text straight to the best match,
searches every document cumulus knows of: the open ones (the shown one
first), the ones opened lately, the .cum files in this document's
folder, and every document their portals and backlinks lead to, however
far (the user's pick; up to 200). Open documents are searched as they
are, the others as their files have them.

It's the / popup with a list of documents to search: one list, best first
whatever the document, each match with its document's name at the end of
its row (the user's pick), the note beside it from that document. Enter
goes to the match through the jump list's GoToPlace, opening a closed
document.

n and N then go through every match, document to document (the user's
pick), going round. The matches are kept in the last search as they were,
as vim's :cnext goes through a :vimgrep list: searched again from each
document, equal matches would trade places and n would bounce between two.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
skkeyeandClaude Opus 5.5 committed 2026-10-02 12:15:04 -04:00
1 parent 9d15a054f2
commit 893edbda9f
15 files changed
+438 -52

No files matched your search

+23 -5
View File
@@ -317,6 +317,23 @@ lines.
tags, and lines after a `| ` are the body of the node above. Looks and
cross-links stay out of both exports.
**Searching every document** (settled in part 9d)
- `<Space>/` (the user's pick), or `:search text` straight to the best
match, searches every document cumulus knows of: the open ones (the one
shown first), the ones opened lately, the `.cum` files in this
document's folder, and every document their portals and backlinks lead
to, however far (the user's pick; up to 200 documents). The open ones are
searched as they are, the others as their files have them.
- It's the `/` popup: one list, best first whatever the document (titles
before tags before bodies), each match with its document's name at the
end of its row (the user's pick), and the note of the one you're on
beside them. Enter goes there, opening its document if it's closed: a
jump, so `Ctrl-o` comes back.
- `n` and `N` then go through every match, from document to document (the
user's pick), going round, as vim's `:cnext` goes through a `:vimgrep`'s
list: the matches as they were when you searched. `/` and `:find` still
search the document shown, and `n` after them stays in it.
**Views, panes and popups** (settled in stage 7)
- The Note view is made of parts: the title, the tags, the body, each link
(out, then in) and each child. `j` and `k` step through them, with a bar
@@ -541,12 +558,12 @@ text).
| Group | Keys |
|---|---|
| **Move** (every view) | `hjkl` or arrows · `gh gj gk gl` tree moves · `w` `b` next / previous in reading order · `gg` root · `G` last · `/` `n` `N` search · `Ctrl-o` `Ctrl-i` (Tab) jump back / forward · `m{a-z}` `'{a-z}` marks (`A–Z` across documents) · Enter or `gf` through a portal · `gu` up to the portals that lead here · `gd` follow a cross-link |
| **Move** (every view) | `hjkl` or arrows · `gh gj gk gl` tree moves · `w` `b` next / previous in reading order · `gg` root · `G` last · `/` `n` `N` search (`<Space>/` every document) · `Ctrl-o` `Ctrl-i` (Tab) jump back / forward · `m{a-z}` `'{a-z}` marks (`A–Z` across documents) · Enter or `gf` through a portal · `gu` up to the portals that lead here · `gd` follow a cross-link |
| **View** | `zz` center · `Ctrl-e` `Ctrl-y` `zh` `zl` pan · `Ctrl-d` `Ctrl-u` half a screen · `+` `-` zoom · `za zo zc zR zM` folds · `zf` Auto · `zi` focus · `K` body card |
| **Create and edit** | `o` `O` sibling below / above · `a` child · `i` `A` Enter edit the title · `I` edit from its start · `cc` `S` retype |
| **Operators** | `dd` or `dab` delete branch · `dib` delete children · `x` delete just the node · `yy` `yab` `yib` yank · `p` paste as children · `P` paste as siblings below · `>>` `<<` indent / outdent · `"a`–`"z` and `"+` registers · `.` repeat · `u` `Ctrl-r` undo / redo |
| **Modes** | `v` `V` visual · `M` move · `C` connect · `:` command · Esc back to normal |
| **Leader** `<Space>` | `c` color · `s` style · `B` border · `t` tags · `=` tidy (`m` map, `c` chart, `g` grid) · `p` new portal (`:portal `) · `o` this branch out, to a document of its own · `i` inbox · `b` documents · `v` then `c`/`o`/`n` for canvas / outline / note · `w` which-key on/off · `?` help |
| **Leader** `<Space>` | `c` color · `s` style · `B` border · `t` tags · `=` tidy (`m` map, `c` chart, `g` grid) · `p` new portal (`:portal `) · `o` this branch out, to a document of its own · `/` search every document · `i` inbox · `b` documents · `v` then `c`/`o`/`n` for canvas / outline / note · `w` which-key on/off · `?` help |
| **Panes, documents** | `Ctrl-w v` `Ctrl-w s` split · `Ctrl-w hjkl` focus · `Ctrl-w w` the next pane · `Ctrl-w c` close · `Ctrl-w o` only · `Ctrl-w =` even sizes · `gt` `gT` `]b` `[b` next / previous document · `ZZ` close pane (the last one quits) |
| **Outline** | `j` `k` rows · `h` `l` parent / first child · `zb` every body · `M` then `j` `k` (`J` `K`: 5) swap with siblings, `h` out, `l` under the one above |
| **Note view** | `j` `k` parts · Enter `i` `A` edit the part (`I` from its start, `cc` `S` anew), or go to that link or child · `h` `l` the sibling before / after |
@@ -749,7 +766,8 @@ cumulus/
(keys every view shares), calls (`:` commands), text_edit (a node's text being
edited, rapid entry), registers (text or nodes), clipboard (the system's, for
"+), yank (nodes into registers and back), visual (selections), repeat (`.`),
search (`/`), jumps (each pane's jump list), marks (capital marks, `:marks`),
search (`/`, and `<Space>/` across documents), jumps (each pane's jump list),
marks (capital marks, `:marks`),
connect (connect mode), portals (what portals show, going through them,
`:portal`, backlinks, renames), branch_out (`:branchout`), panes (the split
tree), export (:export, :import), popup (help, menu, pickers, card, questions)
@@ -757,8 +775,8 @@ cumulus/
The end-to-end tests are in `app/tests.rs` (with `app/tests/files.rs`,
`app/tests/config.rs`, `app/tests/vim.rs`, `app/tests/connect.rs`,
`app/tests/portals.rs`, `app/tests/arrange.rs`, `app/tests/branch_out.rs` and
`app/tests/export.rs`):
`app/tests/portals.rs`, `app/tests/arrange.rs`, `app/tests/branch_out.rs`,
`app/tests/export.rs` and `app/tests/everywhere.rs`):
they copy the sample
documents to a temporary folder, type keys and click on a test terminal, and
check the screen, the documents and the files.