obsidian-switcher-plus
obsidian-switcher-plus copied to clipboard
[Feature Request] Filter Headings by Filename in Headings Mode
When searching using headings mode, it can be difficult to find specific information when multiple files contain headings with similar names.
For example, when searching for information on creating tables in MySQL, searching for # create table
yields many results. To address this issue, I currently use Obsidian search with the following query: file:(mysql) line:(# create table)
.
It would be great if this functionality could be integrated into Switcher++ with a feature that allows users to filter headings by filename.
This could be achieved by using a separator like /
to split the heading and filename, as in # create table / mysql
. This would make it much easier and faster to find the specific information I need within the correct file.
Hey @qiaoxingxing the ability to filter headings to a specific file is already supported via embedded Symbol mode.
For example: you can open Quick Switcher++: Open in Headings Mode
, type mysql
to find and highlight the mysql file result, then trigger Symbol mode for that file (default trigger character @), then typing create table
should show you all symbols (heading in this example) that match from that specific file.
@darlal
Thank you for your response. I typically use the method you suggested when I know which file my note is in. However, there are times when there are too many files to sift through, and I can't recognize the specific file I need.
For example, I have over 10 files with names containing the term "mysql". It becomes a tedious process to scan through these files repeatedly to find the one with the note I need. This is where the file:(mysql) line:(# create table)
search query comes in handy. With this method, I can quickly locate the specific note I'm looking for.
Thank you.
humm.. to make sure I understand, you'd like to be able to filter on both filename and heading at the same time globally. This is different from how the current headings/symbol modes are intended to work.
The current Heading mode searches globally, while embedded Symbol mode requires that you identify the exact file within which to filter. This request is in between and is different in that it would:
- Filter all the filenames vault wide for fuzzy match
- For all the matched files in step 1, filter headings for fuzzy match
So only results that matched both the filename, and the heading would be returned.
@darlal your understanding is correct.