Alias Quick Switcher

by Michael Naumov
5
4
3
2
1
Score: 51/100

Description

Quick switcher that resolves aliases in every path segment, folder notes included.

Reviews

No reviews yet.

Stats

0
stars
24
downloads
0
forks
3
days
3
days
3
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
107
commits

Latest Version

3 days ago

Changelog

  • test(migration): merge driving the retired property handover against the real provider
  • test(screenshots): merge setting the desktop capture theme with applyObsidianTheme
  • chore(deps): merge floating obsidian-integration-testing to ^17.3.0 and re-shooting the now byte-stable desktop frames
  • chore(lint): merge dropping the local MD025 front-matter-title override
  • chore(deps): merge floating obsidian-integration-testing to ^17.1.1 and re-shooting the mobile frames
  • chore(deps): merge floating obsidian-integration-testing to ^17.1.0 and re-shooting the caret-free desktop frames
  • test(screenshots): merge clearing the dependency-gate notice before each desktop frame
  • chore(deps): merge floating obsidian-integration-testing to ^17.0.1 with obsidian-dev-utils ^107.0.0
  • docs(test): merge pointing the dead TARGET_FOLDER link at TARGET_FOLDER_NAME
  • chore(deps): merge floating obsidian-test-mocks to ^7.0.0
  • feat!: merge taking the title properties from Advanced Metadata Cache
  • fix(test): merge the headless demo-vault toolkit install
  • fix(deps): restore the lockfile's missing resolved and integrity fields
  • docs(demo-vault): demonstrate the extra label property, and frame its marker
  • feat: say which kind of name matched, with the property's own marker
  • docs(test): replace the withdrawn Electron-only premise on the query typing
  • test: pick the suggestion row with a trusted tap
  • fix(deps): float devalue to 5.9.4, clearing GHSA-9rgm-9g3h-6x36
  • build(markdownlint): forbid hard-wrapped markdown paragraphs
  • chore(deps): drop the two dead dedupe overrides
  • chore(deps): drop the dead markdown-it override
  • chore(deps): drop the dead js-yaml override
  • style(comments): stop capitalizing the middle of a wrapped comment
  • docs: replace the private rule-id citations with what they assert
  • docs: name the library and the sibling plugins so a reader can resolve them
  • test(cross-platform): close the switcher with a trusted Escape
  • chore(deps): move to obsidian-dev-utils 103
  • test(integration): take the mobile frames with the soft keyboard up
  • chore: adopt the npm run gate branch gate
  • docs: bring the README onto the standard plugin README layout
  • test: wait from Node, so the 60s budgets are ones the transport can honour
  • refactor(android): drive the Android suites with trusted input
  • chore: make the LICENSE copyright line checkable by the linter and guard it against the year roll-over
  • test(test-mocks): drop the hand-rolled app.plugins stubs, and sweep the dependencies
  • docs(readme): add the Coverage 100% badge
  • docs(readme): add the screenshot block, and put the demo vault first

Full Changelog: https://github.com/mnaoumov/obsidian-alias-quick-switcher/compare/1.0.0...2.0.0

README file from

Github

Alias Quick Switcher

Buy Me a Coffee GitHub release GitHub downloads Coverage: 100%

You gave a note an alias so you could find it by the name you actually call it, and you gave its folder one too. Obsidian's quick switcher honours neither the moment you type a path: Echo finds the note, but Alpha/Delta/Echo finds nothing, because the built-in matches your query against the path or against an alias and never against a mixture of the two. This plugin matches segment by segment, where each segment may be satisfied by a real name or by an alias — the note's own, or the alias on a folder's folder note.

Demo vault

The documentation is a demo vault. Every feature has a note that explains what it does, with a worked example you can search yourself.

Start reading here — it is plain markdown, so it works on GitHub with nothing installed.

A copy of the vault ships with every release. You can access it via any of the following:

  1. Running the Alias Quick Switcher: Open demo vault command.
  2. Downloading alias-quick-switcher-demo-vault.zip from the Releases. It unzips into a single alias-quick-switcher-demo-vault-<version> folder.
  3. Browsing its source in demo-vault/ in this repository.

What it does

Take Alpha/Bravo/Charlie.md, where Charlie is aliased Echo and the Bravo folder's folder note is aliased Delta. Obsidian's own switcher finds it from the first four queries and from none of the last three:

Query Built-in This plugin
Alpha/Bravo/Charlie ✅ ✅
Alpha Bravo Charlie ✅ ✅
Bravo Charlie ✅ ✅
Echo ✅ ✅
Alpha/Bravo/Echo ❌ ✅
Alpha/Delta/Charlie ❌ ✅
Alpha/Delta/Echo ❌ ✅

Folder aliases are the half nothing else does. A folder has no frontmatter, so its alias lives on its folder note — and no switcher consults it. That matters most in the vaults where it is most needed: if your folder notes all share one name, the built-in cannot reach any of them by name at all, and their aliases are the only handle you have.

It reads your existing folder-note setup rather than inventing another one. If the Folder notes plugin is installed, its live configuration decides which note belongs to a folder — including a custom name and whether the note sits inside the folder or beside it. Nothing is copied into this plugin's settings, so reconfiguring that plugin needs no migration here.

Every row tells you why it matched, in the switcher's own visual language. A hit reached through a folder alias is rendered as what you typed — Alpha/Delta/Echo — with the real path, Alpha/Bravo/Charlie, underneath it and the same alias marker Obsidian already puts on an alias hit. A row matched by real names alone shows one line, because there is nothing to explain. And a plain alias on the note itself looks exactly as it does in the built-in switcher, because it is the same row — this plugin extends that shape to the rest of the path rather than inventing a second one to learn.

A name that is not an alias says so. Turn on the Titles module of Advanced Metadata Cache and the value of each frontmatter property it lists — title by default — becomes another name a note answers to, ranked and rendered exactly as an alias is. The list lives in that plugin rather than in this one, so every plugin that reads titles agrees on it and you type title in one place. The marker on the row is what tells them apart, using Obsidian's own property icons: the alias arrow for aliases, the text glyph for a property, with the property's key in the tooltip. A row reached through both carries both markers, in the order the names appear in the path. (On a phone, touch and hold a marker for a second to see its tooltip.)

Real names outrank aliases. A result matched entirely by real names ranks above one that needed an alias, so the plugin never reorders the matches you already get today. That is the default ranking; the other one treats an alias as just another name and orders purely by how well the query matched, which surfaces alias hits sooner and gives that guarantee up. Both are a setting, as is whether a segment has to match as one unbroken run or only as characters in order.

Requirements

This plugin requires Advanced Metadata Cache: it loads nothing until that plugin is installed and enabled, says why, and installs it in one click. It is required rather than optional because this switcher's whole design is a lookup index, and that plugin exists to keep the vault's metadata lookups indexed. Installing it changes nothing about what the switcher matches on its own: its Titles module is off until you turn it on.

An Extra label property you configured in an earlier version is not lost. It is kept, and offered to Advanced Metadata Cache (version 1.1.0 or later) the next time both are loaded; you approve it in that plugin's own dialog. If you cancel, it stays kept and is offered again next time.

Usage

Assign a hotkey to Alias Quick Switcher: Open quick switcher and type a path. Obsidian's own quick switcher and its Ctrl+O are left exactly as they are — this plugin patches nothing, so you decide which of the two your muscle memory opens.

Segments are separated by / or by spaces, and a partial path works: Delta/Echo is enough.

Installation

The plugin is available in the official Community Plugins repository.

Beta versions

To install the latest beta release of this plugin (regardless if it is available in the official Community Plugins repository or not), follow these steps:

  1. Ensure you have the BRAT plugin installed and enabled.
  2. Click Install via BRAT.
  3. An Obsidian pop-up window should appear. In the window, click the Add plugin button once and wait a few seconds for the plugin to install.

Debugging

By default, debug messages for this plugin are hidden.

To show them, run the following command in the DevTools Console:

window.DEBUG.enable('alias-quick-switcher');

For more details, refer to the documentation.

Changelog

All notable changes to this project will be documented in the CHANGELOG.

Contributing

Contributions are welcome — see CONTRIBUTING to get set up.

Support

My other Obsidian resources

See my other Obsidian resources.

License

© Michael Naumov