Making deep links easier

Currently I can deep link to headlines inside pages. That’s not as fine grained as Roam makes linking (where I can link to any “paragraph” (block)), but I find it ok for now :wink: Maybe even better in the long run because it makes you think a little bit more about structure, but not too much. I just started with Obsidian and need to play around with it.

However: Headlines are no first class citizens in search during linking. After [[ only page titles appear. That means I have to know in which page a certain headline is defined.
To me that makes easy interconnection between thoughts harder than necessary.

Why not show page names and headlines as search results for auto completion? Or if I know that I’m looking for a headline, why not accept a # as the first character and then only show page headlines across pages?

In Roam link search results after [[ are across page names and blocks. Very convenient!

7 Likes

At present it is a 2 stage process…

  1. Type [[ and you will be prompted with page / file names.
  2. Once you’ve selected the appropriate one, type # and you are now prompted with the headings within that page / file.

Are you suggesting that all pages and headings should be shown as a single step after the initial [[ ?

I think that could get quite overwhelming in a vault with thousands of files, each containing numerous headings.

One issue to consider is uniqueness, what if you use the same headers across multiple notes? I guess Obsidian could show those headers with the filename, much like Obsidian handles same filenames in multiple folders.

Yes, I think some context can be provided, e.g. some heading in some folder/some file

Yes, if I type [[some then all starting with “some” are shown, which might not be that many. But if it’s just [[s then all starting with “s” - and that can be many.

Now, if I type [[#some then all headlines starting “some” in all files are listed. Yes, that might be many - but the number of entries can always be overwhelming. Which means the search ultimately needs to become more sophisticated anyway.

1 Like

Yes, I would actually like to see link autocomplete become a fully-featured search like quick switcher https://forum.obsidian.md/t/use-same-search-component-for-quick-switcher-and-link-auto-complete/706/2

2 Likes

This is not what I see on mobile. As soon as I accept a file name from the suggestions, the editor completes the link. There’s no opportunity to type a “#”. I use markdown links not wiki links, if that makes a difference.

Type the # after beginning to write your note’s title, but before accepting the file name.

If you use Wikilinks, you can type it before or after the link is fully auto-completed. But it seems with Markdown links, you need to do it while it is still formulating the link.

(You’re replying to a thread from 3 years ago. So maybe the behaviour changed a bit since Ampa’s reply. Or maybe there is still a way to add a heading link to a finished Markdown link, but I don’t know it.)

Sorry I still don’t get it. Suppose I’m trying to link to “foo bar.md#thing”. I type “[[foo” and the 1st item on the hit list is my file. If I now type “#” I get this: “foo#” not “foobar.md#”.

Perhaps it is because of Android. I’m testing on desktop (Mac and Windows), and it seems to work for me.

I mentioned I’m on mobile. In this case an Android tablet. So if you’re testing on desktop I’m not surprised the behavior is different. I use VS Code on desktop, but I love Obsidian on mobile. Though I often feel like mobile dev lags behind desktop on Obsidian.

This is an important feature request by @RalfW.

A user of the current autocomplete workflow must know whether the linked item is a page or a heading, otherwise risks needing to perform multiple searches.

The point made by @Ampa about the results becoming unwieldy in massive vaults actually proves how necessary this is.

With the current workflow, as the size of the vault increases, there is increased burden on the user to know which knowledge appears under a header, and which has its own note.

But with a feature like this, after a few keystrokes, the autocomplete list will typically get whittled down to a manageable size, the user is relieved of the burden of needing to remember details of how the knowledge is organized.