Hi, I wanted to share a simple plugin I made to enable linking notes using unique IDs, rather than the full filename or path. This way, internal links function as link-as-search rather than as direct links.
The plugin is called Link by ID, and the GitHub repository can be found here.
This feature has been discussed/requested before (e.g., here, here, and here), and is something I’ve wanted to see in Obsidian for awhile now. I searched for existing plugins or features that might already do something similar, but I couldn’t find anything. The best proposed workaround is using aliases, which has some drawbacks.
I always thought this seemed like a fairly straightforward feature to implement as a plugin, if only I knew how to code. As it happened, I’ve been teaching myself more about coding recently, and I decided I had enough confidence to try implementing this feature as my first plugin.
As this is my first time doing anything like this, feedback and comments are very welcome. I used this sample plugin template as a starting point, and went from there. I found this overview in the docs helpful. I also relied heavily on Google and LLMs for coding advice and suggestions.
I’ve only tested this plugin on macOS in small/medium sized vaults, so I’d love to hear how it works for other setups.
Installation
I still need to go through the steps to submit this plugin and make sure it follows all the submission requirements before it can be reviewed as an official community plugin. I thought I’d post this here first to have the opportunity for early feedback.
For now, it has to be installed manually by copying the repository into your plugins folder. You can use GitHub Desktop or git commands for this. Alternatively, you can visit the repository here, click the green “Code” dropdown button, click “Download ZIP”, unzip the file, navigate to your vault’s plugin folder (/your-vault/.obsidian/plugins/—you may have to unhide the /.obsidian/ folder), and move the unzipped obsidian-link-by-search folder inside the plugin folder.
A note on the underlying approach
There is good reason to want to be able link notes using unique IDs (link-as-search) over direct links using full filenames or paths. Essentially, this decouples the link target from the note title itself, which allows each note to have a permanent location by using a unique ID (UID) that remains stable even if the note title changes.
Although Obsidian can automatically update internal links if the note title ever changes, this relies on software features that may become inaccessible in the long-term. Linking notes using unique IDs is practically always possible using any computer with basic search capabilities, making this approach more software agnostic. This is an essential philosophical aspect of the Zettelkasten Method that supports the core value of longevity (à la https://zettelkasten.de/).
For more on this, see the following:
- Getting Started • Zettelkasten Method
- You Only Find What You Have Identified • Zettelkasten Method
- The Hidden Problem with Note Titles as Links (And How to Fix It) • Zettelkasten Method
- link-as-search vs link-as-direct — Zettelkasten Forum
- Other Text Editors with Link-as-Search Functionality (like The Archive and Zettlr)? — Zettelkasten Forum
- In the ZettelkastenDe YouTube livestreams, Sascha and Christian demo note-taking in the Archive and show/explain how the link-as-search feature in the Archive is advantageous.
README
I built in a few additional features that make life a bit easier while using this plugin. For reference, I’ve copied/pasted the README text below.
Let me know what you think! ![]()
Link by ID
Link by ID is a plugin for Obsidian that enables linking notes using unique IDs, rather than full filenames or paths.
When enabled, this plugin alters the behavior of internal links to function as link-as-search rather than direct links. Instead of resolving links directly by filename, clicking on an internal link searches the vault and navigates to the first file returned that contains the link target in the filename. If no such file exists, a new note is created as normal.
For example, you could link to the note 202603201552 Niklas Luhmann's Zettelkasten by using [[202603201552]] rather than [[202603201552 Niklas Luhmann's Zettelkasten]].
The same search logic applies to page previews, so hovering over these links will still display the correct note.
This approach decouples the link target from the note title itself, which allows each note to have a permanent location by using a unique ID (UID) that remains stable even if the note title changes. This is consistent with the software agnostic approach to Zettelkasten as discussed at https://zettelkasten.de/.
Settings
- Search on click (backlink view)—When enabled, clicking on an internal link opens Obsidian’s Search panel and triggers a vault-wide search using the link target as the query. This provides a way of viewing backlinks.
- Hide unresolved link styling—Enables CSS that removes the dimmed appearance of unresolved internal links so that links made using UIDs look identical to standard resolved links. Note that this affects all unresolved links in the vault, not only those made using UIDs.
- Enable link ID autocomplete—When enabled, typing a configurable trigger string (default: @@) opens an autocomplete menu to search for notes. Selecting a note inserts its UID as an internal link instead of the full filename.
- Trigger string—Define the character sequence that activates the link ID autocomplete search.
- ID delimiter—Specify the character(s) separating the ID from the rest of the filename (e.g., a space or dash). Must not be a character used in the ID itself. Avoid using common markdown syntactical elements (e.g.,
_,*,>, or[). - ID position—Set whether the ID is located at the start or end of filenames.