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

+4
View File
@@ -97,6 +97,8 @@ pub enum Call {
Tidy(Layout),
Align(Side),
Find(String),
/// `:search`: every document.
Search(String),
Backlinks,
Jumps,
Marks,
@@ -259,6 +261,7 @@ fn build(spec: &Spec, bang: bool, args: &[Option<&str>], sources: &Sources) -> R
Id::Tidy => Call::Tidy(first.map(layout).transpose()?.unwrap_or(Layout::Map)),
Id::Align => Call::Align(side(text)?),
Id::Find => Call::Find(text.to_string()),
Id::Search => Call::Search(text.to_string()),
Id::Backlinks => Call::Backlinks,
Id::Jumps => Call::Jumps,
Id::Marks => Call::Marks,
@@ -546,6 +549,7 @@ mod tests {
("fold", "open"),
("align", "left"),
("find", "beds"),
("search", "beds"),
("set", "mouse"),
("theme", "light"),
("export", "md"),