Paulo Vianna296 downloadsTurn graph filter queries into removable chips: Esc leaves editing without clearing, and Enter saves the filter as a chip you can remove with x.
Turn the graph view filter into removable chips.
Today the graph filter is a single text field, and pressing Esc wipes it out.
This plugin changes that:
| Action | Vanilla Obsidian | With Graph Filter Chips |
|---|---|---|
Esc |
clears the whole filter | just leaves the text field, keeps the text |
Enter |
only re-applies the filter | turns the text into a chip |
| Remove a term | edit the raw text | click the x on the chip |
Enter commits the current query as a chip.Esc only blurs the field; the filter stays.graph.json, so it survives restarts.The graph filter is easy to lose: a single stray Esc erases a carefully built
query. Chips make the filter explicit, visible, and individually removable.
Settings → Community plugins → Browse → search for Graph Filter Chips → Install → Enable.
Copy main.js, manifest.json, and styles.css into
<your-vault>/.obsidian/plugins/graph-filter-chips/ and enable the plugin.
path:"Projects", -file:home, or tag:idea.Enter to turn it into a chip.Esc any time to leave the field without losing what you typed.The plugin relies on a few stable graph internals:
.graph-controls .setting-item.mod-search-setting input[type="search"].engine.filterOptions.search.getValue()
and applies it with engine.updateSearch().Esc clearing the field is the native behavior of <input type="search"> in
Chromium, not Obsidian's code.The plugin overrides getValue/setValue on the filter instance only
(chips become the source of truth) and intercepts keydown in the capture
phase on an ancestor of the input, so its preventDefault runs before the
native clear. Everything is restored when the plugin unloads.
minAppVersion).No build step, plain JavaScript.
# copy the plugin into a vault for live testing
./scripts/sync-to-vault.sh
Then reload Obsidian (Ctrl/Cmd + P → Reload app without saving).