Is there an easy way to create a link to a section in another file?

I need to easily create a link to a sub-heading in another Markdown file. The heading have spaces in it. Creating manually with HTML encoding is tedious. eg: [Getting Started](Getting%20Started#Issues%20to%20solve). This works perfectly (despite it highlights the whole section, which is not preferable. Highlighting the heading is sufficient in my opinion.

Reference:

This post suggest a [[^^ prefixed search, which seem quite intuitive. However, the tags it leave seem to get rendered into the pages I generate using Markdown.

Reference:

Does anyone know a more smarter way to end up in HTML encoded link but using a few shortcuts to get to the final outcome more quicker?

You can turn off Use [[Wikilinks]] in Settings:

but still use the suggester when creating links to headings (and blocks). Once you have linked to what you want, hit enter/return and a Markdown link will be created.

Obsidian_mmhqiRp2PY

I tried with the sandbox vault. Here’s what I found.
If the WikiLink is switched on then starting with [[ and completing using a tab helps to construct the link to another page’s sub heading.

However, if the WikiLinks are off, which is the way I use, because I need the standard markdown notation, then the auto-completion for the sub-heading of another page doesn’t work.

What happens is after completing the page link, the cursor jumps out to the end and even if you come back to the link to edit it so you can link the sub-heading, the auto-completion would not work.

A quick video describing the issue

In your clip (the second link you make), you are hitting enter before adding the link to the heading/block.

The process is:

  1. type [[
  2. start typing the note name
  3. down arrow or click on the note
  4. when the note is highlighted in the suggestion list
  5. trigger the link to heading (#) or link to block (^). the options are at the bottom of the modal.
  6. down arrow again or click on the link/block
  7. finally press enter
1 Like

That worked - thank you!
While the page highlighted typing # opens up the headings on the sub-page.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.