guopenghui / obsidian-quiet-outline

Improving experience of outline in Obsidian
MIT License
316 stars 17 forks source link

FR: Add regex filtering for headings #22

Closed ManasMadrecha closed 2 years ago

ManasMadrecha commented 2 years ago

Currently the headings are filterable using fuzzy search, but it would be great if there are options to add more advanced functionality like "Exclude certain headings", e.g., !dontsearchthis or "Exact match", e.g., =searchthisonly.

Similar to:

  1. https://github.com/nothingislost/obsidian-bartender 's search filter bar
  2. Fuse.js
ManasMadrecha commented 2 years ago

@guopenghui Since you are using Vue, can you use v-model to take the regex string in the Input box and filter the headings using it? A very little VS Code-style button can be added if one wants to enable regex search.


Maybe, you can use filter prop instead of pattern in the NTree component.

guopenghui commented 2 years ago

Supported in 0.3.0:

image