Wiki links - auto suggest existing docs?

I’m delighted that wiki link formatting works
What would take it to the next level would be that in words coming right after [[ auto suggestions of existing doc titles would pop up as you type.

While Scrivener does not support blind linking like wikis do, it does support typing in links the way you would on a wiki (like [[this]]), and with a keyboard shortcut you can request title completion, via the Edit ▸ Completions ▸ Complete Document Title menu command.

The setup basics:

  • In settings, under the Corrections tab, enable Automatically detect [[document links]]
  • In the Behaviors: Document Links tab, consider setting Open new document links in… to “(Do not open)”, unless you want something else to happen of course, but that setting will provide the most wiki-like linking behaviour.

Further reading that you might find interesting, if you’re looking to use Scrivener in a fashion that promotes a network of internal links:

There is probably more! While “wiki link” is a good start to search for on the forum, try broadening your search to “internal links document” as that uses the official jargon, and “document bookmarks”, which are not hyperlinks in the editor, but a jump list you can set up in the sidebar (and also how you would find what links to an item as bookmarks are automatically created as back-links). And of course there is a whole major section in the user manual PDF (found in the Help menu) on Linking Documents Together, in §10.1.

1 Like

Thanks so much for this - finding the shortcut for complete document title does get close to what I’m after (though it would seem just a small extra step to be able to set it as a default behaviour when letters come right after [[ ?)
I’ve played with Obsidian a fair bit and decided that Scrivener was the right platform for the project even before the [[ ]] option was there at all, so its all bonus.
Thanks for the links for more reading

That is indeed something I have jotted down on our list of improvements to look into. It would probably be possible given we already do something very similar when typing <$..., which is the syntax used by Scrivener’s placeholders.

Obsidian is a good tool, but I find it useful for an entirely different kind of thing than what Scrivener provides. The two even work quite well together if you want to press the advantage of those areas where they don’t overlap.

1 Like

Thanks for the pointer @AmberV to this thread. I believe I’ve managed to replicate the behavior described which does go a long way toward the search/autocompletion intent. I never would have figured out how without your guidance here. I’ve used Obsidian as well and enjoy the [[ completion behavior. Other apps such as Devonthink will assist with completion in a similar manner as its “move to” command (control-command-m) which is actually what I was thinking of when suggesting command-L behave that way.

I can see how this is helpful as it is though.

FYI my use-case for this however wasn’t to create a wiki. Rather instead to quickly jot down links to different scrivener document references as I’m typing normally (such as when typing an inline annotation to myself with a link to a relevant reference). I’d grown to use command-L a lot and was looking for this path.

1 Like

Oh sure! We just call it a “wiki link” informally, because that is where the syntax of using double-square brackets originally came from. How one uses links, conceptually, can be all over the board in Scrivener. If you follow my nest of links above, you’ll see I’m an avid “linker” in Scrivener, and use probably every tool in the toolbox except for that wonky Ctrl+L interface. I’d mess around in the binder before using that! :laughing:

I would also call out the Quick Search tool, in the main toolbar, as a valuable linking tool—and in knowing you can drag and drop out of its search lists, which is 100% identical to dragging from the binder in every way. I switch between using completions and that tool, depending upon the title construction, as sometimes strict [[left-to-right… matching is not very good. For example, in the user manual project, a lot of sections begin with “Using”, followed by a space, and then the actual part I am interested in linking to. Completions currently struggle with spaces (given the underlying technology), so if I’m going to have a big list of results to work with, I’d rather do so in the much nicer interface that Quick Search provides. Plus with the latter I can start typing from “Snapshots” (as in “Using Snapshots”), skipping over the common prefix.

As an aside, we’ve recently put a good amount of effort into finally developing a non-linear matching algorithm. To use my prior example, typing "us sn` would very quickly and efficiently bring up “Using Snapshots”. You’re probably familiar with this from just about every modern tool out there these days. Getting this into Quick Search, and possibly title completion (though again that tool is way more technically limited as-is) would also be a great boon.

2 Likes

That’s great, thanks for sharing!

@AmberV Sorry to just jump in, but is there a setting to use [[Links like this]] directly in the editor? I’m interested in creating an “Index” for a project.

I don’t see that the [[ text ctrl-esc completion workflow works with the Notes pane, although command-L works there as well as the editor. I’m also finding it a little tricky to use the autocompletion in this manner in the editor but I think I’ll get better with practice. However I’m already finding your suggestion to use saved collections and drag-drop a link from there to the editor or notes panel works quite well. It’s still not as fast as I was looking for via typing but it is pretty quick and logical. Is there any way to search within a collection? If I could just hit my Research or References saved collections and type a bit, that would go even more quickly I bet.

Thanks again!

1 Like

I’m certain AmberV will give you a much better response, but I can confirm the wiki linking with double brackets works fine in the editor. You may need to look at your settings as she mentions above:

The setup basics:

  • In settings, under the Corrections tab, enable Automatically detect [[document links]]

  • In the Behaviors: Document Links tab, consider setting Open new document links in… to “(Do not open)”, unless you want something else to happen of course, but that setting will provide the most wiki-like linking behaviour.

For me, I can type [[new document]] and it will ask me if I want to create a new document to link to which will create the document and insert the link. Or typing [[a document title that exists]] will insert a link for that document immediately.

1 Like