File Filter

by Sebastien Delisle
5
4
3
2
1
Score: 51/100

Description

File Filter allows you to filer your pages (and sidebar) by a search term. Everything that doesn't match what you're looking for fades away.

Reviews

No reviews yet.

Stats

0
stars
656
downloads
0
forks
119
days
4
days
5
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
43
commits

Latest Version

5 days ago

Changelog

What's new

  • Table filtering: tables now filter by row. A table with a match shows its header plus only the matching rows, with matches highlighted; tables without a match are hidden. If the header matches, the whole table is shown. Works in reading mode, Live Preview and source mode.
  • Exclude shortcut: type - as the first character to switch to exclude mode. Press Backspace at the start of the field to switch back.
  • Folder names: the Files pane filter now matches folder names.

Fixes

  • The filter bar could not be clicked under themes that draw a background image over the pane.
  • Line numbers no longer overlap while filtering in the editor.

README file from

Github

File Filter

An Obsidian plugin with two features: a live filter for the Files pane, and a paragraph-level filter for the editor.


Editor inline filter

Paragraph filter demo

Click the filter icon in the note header (or press the customizable hotkey Cmd+F) and a filter field appears below the header.

Type anything and watch non-matching paragraphs be hidden. Optionally, you can collapse the hidden paragraphs into an ··· ellipsis. Matching text is highlighted inline.

  • Click ··· or press Escape to clear the filter
  • Press Cmd/Ctrl+Z after clicking ··· to restore the previous query
  • Untick Show ellipses (in settings or under the filter input) to hide the ··· separators entirely

Filter words out

You can also use the filter in reverse: hide every paragraph that contains a word, and keep the rest.

Click the filter icon at the left of the search bar to switch to exclude mode — the icon gains an accent and the placeholder changes to Filter out paragraphs…. Type a word and matching paragraphs disappear instead of being shown.

Shortcut: type - as the first character (e.g. -apple) to switch to exclude mode — the - is consumed, not searched for. Press Backspace with the cursor at the start of the field to switch back.

Click the icon again to switch back. Closing the filter bar resets to normal (include) mode.

Tables

Tables are filtered by row: a table with a match shows its header plus only the matching rows (highlighted), and tables with no match are hidden. If the header itself matches, the whole table is shown. In exclude mode, matching rows are hidden instead.

Task keywords

Task filter demo

Three queries also match task syntax, on top of normal text matching:

  • task or todo — also matches unchecked tasks (- [ ])
  • done — also matches completed tasks (- [x])

So typing todo shows every open task on the page, and switching to exclude mode with done hides everything already completed. Only the exact keyword triggers this — done tasks is matched as plain text.

Note: the filter is designed for editing mode (Live Preview / Source). Filtering in reading mode also works but is known to be buggy.

Preserve structure (setting)

Enable Preserve structure in Settings → File Filter — or use the checkbox under the filter input — to keep ancestor headers visible when filtering a page.

Without this setting, only blocks whose text contains the search term are shown. With it enabled, any header that sits above a matching block in the document hierarchy is also shown — even if the header itself does not contain the search term.

Example: searching apple in a note structured as:

# Fruit Notes
## Varieties
A paragraph about apples.

Without Preserve structure: only the paragraph is shown.
With Preserve structure: # Fruit Notes, ## Varieties, and the paragraph are all shown.


File explorer filter

Click the filter icon in the Files pane (leftmost button in the nav bar). A search field appears below the nav buttons.

Type anything — the filter matches against the full file path, including folder names. So searching boston would surface:

Notes/
  Locations/
    Boston.md
Food/
  Pies/
    Boston Creme Pie.md

Press Escape or click × to clear the filter and return to the normal view.

Behaviour:

  • Matches any substring of the full path (case-insensitive)
  • Folder hierarchy is preserved for every matching file
  • Collapsed folders that contain matches are automatically expanded while the filter is active, then restored when cleared
  • All file types are included, not just Markdown notes

Other Plugins

Check out Date List and Calendar List if you liked this plugin.