Add special search for `headings` but inside a `focused in` on todo

I want a similar thing to cmd+p but when I have todo focused in on

i.e. in below

I want to have a search that includes all todos that are inside it (no matter how deeply nested they are).

And that is different to cmd+p global search.

Thank you.

Not implemented yet, but I think a relative search would be a good way to indicate this. So you would add a . at the start of your search to indicate that the path should be evaluated relative to the current focus.

Like this:

.//task

I think that would work pretty well. Does it seem like it would give the behavior that you want?

Also, I expect some of this might change in Bike 2, but these are good enough stopgap solutions I think.

1 Like

Yes, ideally what I want is one keybind that would do this relative search.

With your solution I could automate it in KM by doing cmd+p then pasting . (if you can provide that in one keybind would be great too perhaps)

But yes, that would work well.

i.e. above should match and jump to the row

thank you lots

The latest preview release supports relative paths (start with a period) to generate the items used in Command-P window. When the path is relative it will be executed relative to the current focus item. I think that should give the behavior that your want.

doesn’t work unless I misunderstand something

I thought I could do this . <search>

Here’s how I was thinking it would work for your case:

This means when you choose “Focus Heading” you will only ever see the tasks of the focused part of your outline.

this is perfect

the fact that I can jump to any root heading + children heading

all I really want now is a separate search that does exactly as above but where the root of the search is where I am focused in on

hope that makes sense

As well as a search that only does root level entries

Perhaps there should be a scriptable thing that I can pass a search query filter into the search prompt to allow these 3 cases (and more)?

It does, but I don’t think I will add that right now. Bike 2 is adding outline filtering. I expect there will be some way to store and manager multiple outline path searches. I think that would be the system to leverage for this. So I want to wait on that first.

This is super important to me, let me know when I can try Bike 2 that has this feature so I move to it.

Last build of 2 I tried was super laggy, perhaps it’s fixed now.

Also can you add a thing in this search

Where if I do opt+down_arrow it will jump to the next root element (not the child)

basically I want to at least be able to jump between root level items if I can’t do a root level only search :crying_cat_face: