Toggle Hidden UIDs as a method for Blocks to allow referencing

So I’ve be playing with adding hidden UIDs to the end of each numbered line I have. This essentially gives me a unique identifier for every line of text, regardless if the text ever changes, right in the md files. If these could be linked or better yet referenced, with say (()), you could get a much more nuanced linking system.

If there was a plug in for a UID to be generated at the end of every line with text (numbered line), as < p hidden > UID </ p >.

This would happen in the background as you work (could the hidden UIDs be toggled to be hidden while in editor? Would make the editor cleaner).

Then say you type (( which begins a global text search, type until you find the line you’re looking for, select.

Plugin then takes the source notes title, the line’s UID, and perhaps even copies the text itself (if needed for portability) and paste them into the destination note.

In [[UID201810 - Obsidian Notes | Obsidian Notes]]

Type “My great notes” on a line

Obsidian generates UID at end of line < p hidden>UID123 < /p>

So the line becomes:

My great notes < p hidden>UID123 </ p> (UIDs are always hidden)

On another note [[UID20181011 - Cool Places | Cool Places]]

To reference type “((”

Begin typing “My gr”

“My great notes” will be autosuggested by doing a global (formatted?) text search.


Selecting will have Obsidian take the sources file name, the hidden UID of that line and text in that line, then generate a UID for the destination line. It writes the ref like this:
“[[UID201810 - Obsidian Notes | Obsidian Notes]] (UID123)((My great notes))< p hidden>UID456</ p>”

This displays/renders as:

“My great notes” (visual indication it’s a referenced block)

Obsidian’s generation allows the destination files text to to contain the sources file name, the lines UID, the text in the line, the embeds lines UID all the .md file to allow for portability.

Obsidian, the viewer, would I guess would use a novel, but easily convertible syntax (sort of like | currently) to make the generated notes more legible.


I do like this idea (as a plugin, and not core functionality).
I’ve been doing something somewhat similar manually (with the help of a text expander), using <a id="UID123"></a> at the start of a block (or in my case, bullet).

I’m using a UID format with date and time (e.g. 20200524140032) and pasting it in when I take notes, especially the likes of journalling or meeting notes. My hope is one day to build/utilise a plugin to not just link to or transclude these notes, but to kind of “sync” them with the timestamps against an audio or video file. That way I can look at a note and jump to that place in the recorded meeting to listen again (or vice versa from meeting to note).

I don’t know how likely a plugin like that will become in the future, but it’s interesting to think about.


That’s awesome. Glad to know others are playing with similar thoughts.

Your sync with timecode is an amazing idea. That’s the beauty of UIDs, esepecially at the line/paragraph level. I think UIDs with time/date formate is great. It might be possible to add other context/attributes to the UID too (i.e. being on a indent). Just a thought.

I sure hope a plugin could be developed that could approximate it, I feel it’d really make Obsidian competitive as powerful, yet flexible note taker/networked thought app.

As long as the plugin functions/syntax are consistent & anyone could build a converter to hide/handle the UIDs (or an export that has the option to delete them automatically) I personally don’t really care that the .md files are flooded with them & potential legibility is sacrificed.

If you turned on this option you’re probably using UIDs for that level of context in notes for a reason, and likely would really only use them notes in places that can use them too. But like I said, an exporter &/or converter could help for portability/legibility.

Yeah, with any “extensions” to typical markdown syntax a converter is a good idea.

The reason I chose <a> tags in particular is probably similar to the reason you suggested <p hidden> - They get hidden from the HTML render while still being present to provide information.

I’m fascinated with the chronology of work in connection to all the various projects we involve ourselves in. Using a timecode as UID would give us a fantastic tool for time tracking and analysis. I’m already drooling over my future infographic time comparisons between various tags connected to my writing, structured by sections, notes, and groups of related notes. Having these metrics will help us learn how to better estimate upcoming projects.


Just as a thought on time (and versions) - I have my vault in a git repository with gitwatch running - so a new commit gets made when I make a change - be that new note, edit, whatever.

So, I can fairly easily go “back in time” if I want.

Should this not be somehow merged with the feature request Block reference ?