TfTHacker / obsidian42-strange-new-worlds

Revealing the strange new world of connected thoughts in your vault.
https://tfthacker.com/SNW
MIT License
432 stars 13 forks source link

Feature request: Allow filtering / searching of results #10

Open danrthompson opened 1 year ago

danrthompson commented 1 year ago

It would be awesome to have a way to search or filter through the results (inline or in the sidebar - either or both would be awesome). The ideal solution would look like the backlinks pane search interface.

There are some complexities when it comes to figuring out what to search through (just the text on the link's line? The whole block? The whole file?). I think any solution though would be a big step forward.

If I had the ideal solution though, I'd love to be able to filter by, in order of priority:

  1. Text on the link's line
  2. File path
  3. Tags in the file (we would already be able to do the link's line's tags by just searching the text)
  4. Maybe text of the file, but I think that would get too crowded

This is really just a nice to have, but I thought I'd throw it on the backlog!

mbentley commented 7 months ago

I also find myself wanting to search through the SNW pane. One of the limitations of the search utility in the native Backlinks plugin is the lacking of search within a block. It returns all references within a file where there is a match so it returns results that are not in context of the search string.

So like if this was my note:

## 2023-12-30
* [[Acme]]
  * Foo
* [[Buy n Large]]
  * Foo

## 2023-12-29
* [[Acme]]
  * Bar
* [[Buy n Large]]
  * Bar

And I searched when looking at the backlinks for [[Acme]] for "Foo", I would ideally like to see the results filtered to:

## 2023-12-30
* [[Acme]]
  * Foo

As right now, the native Backlinks would only return:

* [[Acme]]
  * Foo

* [[Acme]]
  * Bar