Add alias sync function to internal link

Add alias sync function to internal link

Obsidian can create links with an alias as its custom display text, for example, [[Artificial Intelligence|AI]]. However, if I change the alias property to “AA”, the link with the alias will not change automatically. I have to change it manually, which is different from the internal link behavior; if the linked name changes, all links will auto-update.

Proposed solution

Add alias sync function. like ‘title’ property to internal link.

Example: [[Artificial Intelligence | title]], and the title will auto sync to the title property in the page.

Current workaround (optional)

Manually

Related feature requests (optional)

None

1 Like

Unless I misunderstand the problem, I think you have a wrong concept about the purpose of the link alias. A link alias is nothing else than text that should be displayed instead of the actual link. So if you change the alias, i.e., the part after |, that obviously should not change the link itself.

Edit I see what you mean: you want to be able to specify a variable as the alias, such that, when you change it in one place, it is automatically changed everywhere. There currently is no such functionality in Obsidian, nor is there anything like this in markdown, unless for example in Latex, where one use for example \newcommand\x{AI}, then refer to that as \x in the code, which will be replaced by AI during compile time.

For now, you could globally search/replace | AI]] by | AA]] across the entire vault. Global search/replace is not a core feature of Obsidian, but there is a community plugin, “Global Search and Replace”, and it can be done with external tools (code editor like VSCodium, GNU sed command, etc).

An idea to make such “variable” truly unique is to surround it with an “invisible separator” unicode character, U+2063. That character does not display, but can be specifically found.

I understand your confusion. Perhaps I wasn’t clear enough.

I’m aware that an alias is merely custom display text. My initial idea was to introduce a new property, such as “title”, which could then be used as the display text for internal links. Additionally, this title could synchronize its value whenever I update it.

In my workflow, I use timestamps to create notes to avoid filename conflicts. Subsequently, I employ aliases to refine the display text, omitting the timestamps. However, the limitation of aliases is their inability to automatically update when I modify the alias property in the file’s frontmatter.

Therefore, I propose the use of a special property like ‘title’ to differentiate between the filename and the note name when they differ. This ‘title’ property could serve as custom display text and remain in sync with the ‘title’ property within the note.