Menu

No Index, No Debounce: Searching a Project on Every Keystroke
📰

No Index, No Debounce: Searching a Project on Every Keystroke

DEV Community: cpp·HideyukiMORI·9 days ago
#CEOiir7o
#devtocpp#devto#dev#files#search
Long article (1077 words) — no AI summary yet.
Reading 0:00
15s threshold

When I typed caret_sparks into NeNe Nib's project search, it went through 1,995 files, found 91 matching lines, and refreshed the list on each key I typed.

There's no index behind it, and no "wait 300 ms before searching" timer either. Here's the whole search side of the editor in about a minute:

What's in this post:

One palette for files, tabs, settings and search

What happens between a keystroke and the next list of hits

What I chose not to build, and where that costs you

The editor

NeNe Nib is my text editor for Windows 11, written in C++23 on plain Win32 and Direct2D. It works like Notepad by default, and Ctrl+Shift+Space switches it to Vim editing. I've written about how fast it opens files and the caret motion in 1.2.0 . This one is about finding things.

One palette, one key

Ctrl+P opens a single list. With an empty input it shows your open tabs, bookmarks, recently closed files and the files in the current folder, matched loosely by name.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.