Small but big QoL: When linking a pre-existing word or phrase, display the note suggestion menu

Use case or problem

When I’m reviewing (or writing) a note and I decide that I want to link a word or phrase that’s already present in the note, I want to select the word (a double-click, drag and select or hold down shift and use arrows) and tap [[ to make it a link. At that point, I also want to see the note suggestion menu, in the same way that I see it if I type the [[ before typing the word.

Proposed solution

Simply, display the note menu when a user selects a word or phrase and presses [[ and then let the user choose a note to link. Ideally if the name of the chosen note doesn’t match the selected text, then create a [[name of the chosen note|originally selected text]] link (with the alias feature just released in 0.9.16, this would be so, so good as selecting an alias word in a note would then provide me with the correct note to link to :slight_smile: )

In short, I want this to happen:
linking-video-1

When I do this:
linking-video-2

Current workaround (optional)

Selecting then deleting the word/phrase, then typing [[ and then retyping the word or phrase triggers the menu. But that’s really quite annoying, especially if I’m editing a large note. I often write/expand a note out on it’s own, and then go back through it working out which bits link it to all the other notes. This is a big part of connecting and gardening my evergreen notes.

Related feature requests (optional)

Display a list of current note's outgoing unlinked mentions is the same underlying idea, but presented as a list covering a whole note rather than on demand for a text fragment as here. Build once, display in two ways, two feature requests ticked :slightly_smiling_face:

Not really a feature request, but I wrote this a little while ago Connect new notes to existing notes when existing note titles are not just single words? which is relevant.

11 Likes

YES! I’ve been meaning to write this exact feature request for weeks! Thank you for articulating it.

Linking existing words and phrases is a natural part of my workflow and this would make life so much smoother.

I think there are other UX nuances to this request that would need to be fleshed out. For instance, I’d like to see this also work when typing [[ in front of an existing word. In other words, typing [[ in front of usability should open the note suggestion menu with “usability” already the active search term.

Just to confirm, I think you mean this situation?

word-search

But when the suggestion menu opens, it should look something like this:
image

If that’s what you mean, then I agree :100:

Exactly :raised_hands:t2:

1 Like

Edited the original post, just to explicitly link to Display a list of current note's outgoing unlinked mentions as they’re convergent.

After thinking about it some more, I think your request, as written here, would require two related tweaks to the behavior of the link suggestion popup menu — in order to work smoothly in the general case. Consider expanding your feature request to include these ideas if they seem helpful. Though the first could stand on its own as a separate request.

#1. Tweak the current fuzzy search algorithm for link suggestions. To illustrate, if your feature were implemented today, your “usability” example would work one way but not the other:

  • Word to phrase: Highlight the word usability with intent to link a note on usability you wrote but can’t remember the title phrase. Type [[ and link suggestion appears for Usability is made up of three things. Select it and the word is replaced by the linked phrase.
  • Phrase to word: Highlight the phrase Usability is made up of three things with the intent to link to a note usability. Type [[ and the link suggestion popup is empty.

The problem is, current fuzzy search requires matching all the search terms. It would be better if it falls back to matching fewer terms. Then it would suggest notes that had shorter titles than the phrase being linked. Ideally it would have even fuzzier fallbacks and offer at least some related suggestions (synonyms, etc.) if the results would otherwise be empty.

This seems like it’s worth making a standalone feature request - and linking back here as related.

#2. One way to get the pipe-linking behavior you describe — where choosing a link suggestion results in [[name of the chosen note|originally selected text]]: change the behavior of typing | with the link suggestion popup open if there is already highlighted text being linked.

  • Currently: typing a pipe character | with link suggestion open replaces the existing link text with the chosen link title, adds a pipe character | and is ready for you to type the link’s display text.
  • To get your requested behavior: highlight the desired link display text, type [[ to get the link suggestion popup, arrow or mouse to the desired note, type | to get the result [[desired note|link display text]]