Notes: Searching

To search inside my notes I use mostly plain text search. Searching as I type works so fast that reverse indices are not necessary. I basically just grep (or awk) directly.

As of 2025-07-28 my notes consist of 4.4e3 Markdown files containing 2.4e6 characters in 89.0e3 lines.

The search is so fast that I configured my system to preview results directly as I type the search query (the number of results to preview is computed based on the terminal size). I press enter to display the full results.

asciicast

This is implemented in functions Search and TitleSearch in Edge’s rc/editor_commands/lib/zk.cc, calling grep and awk.