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 )
In short, I want this to happen:
When I do this:
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.
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.
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]]
See your points. For this feature request, my real need is “word to phrase” but I agree - a separate fuzzy search general improvements suggestion would be good. I’ll see if I can find something that’s already been written, or start a meta-thread on it, because I feel there will be more than just this one thing that would be good to add.
Your #2, see the KM link I’ve added above. I’m playing currently with it and it’s very close: in short, it works exactly as intended if the note has an alias that matches your selected text (it’s inserting the alias as the link text):
Thanks, something very close to your suggestion is suggested here as well Using (and automating) Obsidian on macOS - Meta Post It does work around the mechanical typing issue, but doesn’t work around the matching/search component on suggesting likely link pages - up to the devs on that bit at some point
It’s not exactly what is talked about in this thread, but it’s very close:
I have files for people that start with a @, and it automatically links them for me without need to type [[ which I’ve found hugely smooths things out
it also pops a menu whenever you’re typing something that already has a note - useful, although sometimes annoying (whenever I type the word ‘meeting’ for example, it pops up. But it then goes away
and finally, most relevant to this thread there is a shortcut key/palette command for you can bind to trigger the suggestions dropdown. But I’ve found it sometimes just doesn’t operate. The triggering while typing is very robust, however.
Yes, I already use this plugin and it is great, but unfortunately it´s not a solution to this problem.
I am structuring my transcripts and every time I want to link a word or phrase it takes 4 keystrokes to trigger the box (select word; set 2 brackets; press right arrow and press space bar). Very annoying and time consuming with long texts and many links.
I guess I have to try autohotkey to solve this.
Small update. With Autohotkey it was easier than I thought. It is not the best way, because I didn’t want to use an extra tool. Anyway, now I have a hotkey on the numpad. Here is the little script:
Better handling of auto complete page names when you select some text and press [[ double brackets to add around it. I recorded a video to demonstrate (see GIF at bottom of post). I have to currently select the word/phrase, press double open bracket [[ and then I have to either just trust that whatever I have in the text is correct or that I want to just create a new page without it searching my vault. If I want to see the suggestions modal popup to search/match current page names, I then have to delete the last character so it activates the search/suggestion box.
Proposed solution
What I would like is that the box pops up as if you had typed that whole text string you selected. If no match it will say “no match found” and you can press enter to create that new page and have cursor move outside the closing ]] (like it natively does today if you just type out [[this is a new page – PRESS ENTER – ).
Current workaround (optional)
I have to currently select the word/phrase, press double open bracket [[ and then I have to either just trust that whatever I have in the text is correct or that I want to just create a new page without it searching my vault. If I want to see the suggestions modal popup to search/match current page names, I then have to delete the last character so it activates the search/suggestion box.
When typing double square brackets, the page suggestion dropdown appears so you can pick a page to link to. However if you select some text and press [[ to surround it in brackets (the closing ones are automatically inserted), the dropdown doesn’t appear until you make further edits to the content between the brackets. This is kind of annoying.
e.g., if the text is Obsidian and you select it, then press [[, you’re left with [[Obsidian]] but no page suggestion dropdown to link it, which matters in the event that what you’ve typed is an alias to the page.
Proposed solution
Ideally Obsidian would show the page suggestion dropdown immediately when typing [[ with some text selected and not require subsequent edits.
Current workaround (optional)
Insert and delete a character to “trick” Obsidian into showing the dropdown.
I often decide to turn existing text into a link to a note. So I highlight the text and type [[. This nicely surrounds the text with [] but does not bring up the note suggestion tool with existing notes.
Workaround: I’ve found that you have to move the cursor to the end of the text and delete the last character or start typing more. The suggestion tool then appears. This solution works, but it’s a bit clumsy.
Feature request: show the suggestion tool as soon as highlighted text is surrounded with [], using the highlighted text to suggest notes.