This seems like it should be basic functionality but it’s not working.
When linking selected text to an existing note using Cmd+K, typing [[ inside the dialog to search for notes will surface the correct note in autocomplete — but upon selecting it, Obsidian creates an empty ghost file with [[ literally baked into the filename (e.g. [[notename.md) instead of resolving to the existing note. The link then points to this empty ghost file rather than the intended target.
This appears to be a conflict between the markdown link system (Cmd+K) and the wikilink system ([[). The [[ characters are being treated as literal filename characters rather than as a wikilink search prefix.
Has anyone found a reliable workaround for linking selected display text to an existing note without this ghost file behavior? And is there a bug report open for this?
You want the “internal link” command, which is Cmd Shift K, not the “Markdown link” command (which should really be “external link” in accordance with the documentation).
It seems that the “Add internal link” function merely wraps the text in square brackets, treating it as the note title rather than using the text as the display label and searching for the target note to which the link should point.
“Use wikilinks” was checked. “Add internal link“ produce [[selected text]] independently of status of “Use wikilins” checkbox. “Insert markdown link“ produce [selected text](<cursor without select note menu>). This is semantic different behavior of two similary commands.
I believe when “Use wikilinks” is unchecked, “Add internal link” should produce a Markdown link. It first produces a wikilink, but that is converted to a Markdown link when you select a link suggestion. If you select text that doesn’t match any note names, selecting “no matches found” replaces the selected text with an empty Markdown link, which seems bad.