somebodil49 downloadsGo to a file by its name or find text in your notes, and hide paths you never want to see with regular expressions.
Two dialogs for Obsidian that take you where you want to be, without leaving the keyboard.
In both, you pick a result and open it in the current tab or in a new one. Paths you never want to see are hidden with regular expressions, and each dialog remembers its own.
There are no settings. Everything the plugin does is on this page.
the-switcher is in the community plugin directory of Obsidian.
Obsidian tells you when there is a newer version, and installs it for you.
main.js, manifest.json, and styles.css from the latest release..obsidian/plugins/the-switcher/ and put the three files in it. .obsidian is a hidden folder.To update, replace the three files with the ones from a newer release and restart Obsidian.
The plugin adds two commands:
Neither has a hotkey until you give it one under Settings → Hotkeys. Until then, run them from the command palette.
The dialog lists the files of your vault, of every type. The file you are looking at is left out, because you are already there.
Words are separated by spaces, and a file has to match all of them. Upper and lower case are the same, and spaces inside names do not count: alphabeta finds Alpha Beta.
| You type | You get |
|---|---|
alpha |
Files with alpha in the name, in an alias, or in the folder path |
alpha beta |
Files that match both words, in any order |
"alpha beta" |
Files that match the two words next to each other |
-alpha |
Everything except what alpha matches |
Notes/ |
Files in a folder whose path has Notes |
Notes/alpha |
Of those, the files with alpha in the name or in an alias |
png lists the PNG images.Projects/2026…/Notes/Alpha. What the query matches in the folders is marked too, in a softer colour than a match in the name.Notes/alpha therefore lists everything in a folder Notes/Alpha as well.Emoji are skipped in steps 1 and 2, so 📝 Memo starts with memo and is listed under M.
Type a text, and the dialog lists every line of your Markdown notes that has it, with the name of the note and the number of the line.
Under the results, the dialog shows the note around the selected line, with the text highlighted. This preview follows the selection as you move through the results.
Opening a result opens the note at that line, with the text selected.
The results are ordered by note, alphabetically by the name of the note, and within a note from the top line down.
The notes are read when the dialog opens: all of them the first time, and after that only the ones that changed. In a large vault the first time takes a moment, and the dialog says Reading the notes... until it is done.
A search does not hold up your typing. In a large vault it looks at the notes a few at a time, and lists the first lines while it is still looking at the rest. The number of matching lines comes last: it reads 50 / ... until every note was looked at. A keystroke that changes the text starts the search over.
Both dialogs have the same keys. Mod is Ctrl on Windows and Linux, and Cmd on macOS.
| Key | What it does |
|---|---|
↑ ↓ |
Move through the results |
Enter |
Open in the current tab |
Mod+Enter |
Open in a new tab |
Mod+E |
Go to the exclude input |
Mod+S |
Go back to the query |
Esc |
Close the dialog |
Mod+click in a new tab.Home and End move the cursor in the input you are typing in. They do not jump through the results.50 / 371, tell how many are listed and how many there are.The input under the query is the exclude input. It takes JavaScript regular expressions, separated by commas. A file is hidden when one of them matches its path, counted from the root of the vault. Upper and lower case are the same.
| Exclude input | What is hidden |
|---|---|
^Archive/ |
Everything in the top-level folder Archive |
(^|/)_templates/ |
Every folder called _templates, however deep |
^Archive/, \.png$ |
The folder Archive, and every PNG image |
daily, weekly |
Every path with daily or weekly in it |
*.png is such a pattern: a regular expression cannot start with *, so write \.png$.\,), inside square brackets ([a,b]), or inside a quantifier ({1,3}).The two exclude inputs are kept as fileExclude and textExclude in the data.json of the plugin. When that file is changed from outside Obsidian, by a sync or by hand, the dialogs use the new values the next time they open.
You change the size of a dialog with the mouse.
Each dialog remembers its own size. The sizes are kept on the device and not in data.json, so a sync does not carry them to a screen they do not fit.
In the mobile app the two commands are in the command palette and in the ribbon menu, each with its icon, and you can put them on the mobile toolbar. A tap on a result opens it in the current tab.
You need Node.js 24 or later.
npm install
npm run dev # rebuilds main.js on every change
npm run check # type check, lint, and tests
npm run build # type check, then the main.js of a release
src/search holds the searches. They know nothing about Obsidian, so their tests run with plain Node.js.src/ui holds the dialogs.src/main.ts adds the two commands and saves the exclude inputs.To try a build, copy main.js, manifest.json, and styles.css to .obsidian/plugins/the-switcher/ in a vault.
A release is built by GitHub Actions when a tag with the version of manifest.json is pushed. The message of the tag becomes the notes of the release. The files of a release come with an artifact attestation, a signed statement that they were built from this repository:
gh attestation verify main.js --repo somebodil/the-switcher