[Feature Request] Fuzzy matching on headers
ericbiewener opened this issue · 3 comments
Consider the following markdown headings structure:
# Big Idea
## Foo
### Todo
## Bar
### Todo
I'd like to be able to select the first Todo
header under Foo
by fuzy matching on a search string likeftod
.
Thanks for the suggestion. The immediate concern that come to mind are around usability, and that this may significantly increase the number of low value (poor) matches. It's an interesting idea though.
In the contrived example above, it seems might seem effective, however, in my experience headings tend to be much longer strings of text then the ones presented in your example. The long heading text, combined with the fuzzy matching on each heading, I think will likely lead to effectively most headings matching some part of the query string thereby significantly increasing the result set with a large number of poor matches.
An alternative to consider is something like what's proposed in #97 which would enable you to restrict heading matches to cases where there's also a match on filename. What do you think about something like that?
in my experience headings tend to be much longer strings of text then the ones presented in your example
It really just depends on how one is using obsidian. For example, imagine using a single file to capture meeting notes for months of meetings, each one using the same note format of headings. In such a case, you'll have many duplicated headings. FWIW, I have since moved away from this approach, thus making this feature request less relevant to how I use Obsidian.
I agree with the downsides you have mentioned. I don't have a fully refined product vision for how to mitigate those. The dumb solution would be to simply make it a toggleable setting, but I would also support your desire to not simply bake in a bunch of toggleable functionality settings for hypothetical use case :)
Feel free to close this issue.
Thanks for the update. The single file usecase is interesting, I'll consider if there's some clever things that could be done in Symbol Mode or something like that. Thanks!