When we press ‘tab’ while we’re linking a note, the first option in the note gets auto-filled, this also happens when we press ‘enter’.
What I want obsidian to do is add ‘|’ at the end of the link when I press ‘tab’ so that I don’t have to write it manually.
I hope this makes sense.
This way, when I press enter, the page name gets auto-filled, and when I press tab I have the option to change the preview name (the word I see in preview mode) of the note.
I think this is a fairly easy feature to add and it’ll really help my workflow
if you look at the screen rec below, it might help you understand better
in the first link, I pressed tab, and then I had to manually put ‘|’. And in the second link I pressed enter and then the cursor skipped through the brackets.
so all I want is when I press ‘tab’ the ‘|’ is automatically added at the end.
Nice idea! I’m also frequently frustrated with the behaviour. I mostly use links inline as parts of sentences, so I nearly always use | as most note names don’t work in the middle of sentences. Manually writing | every time is quite tedious!
I found this feature request that gets at the problem by using a hotkey instead of automatic behaviour: Key Combination for custom preview link - #3 by mafsi
Automatically inputting the | could lead to unnecessary clutter when it is not utilized, so I would prefer a hotkey for inputting the custom link syntax when needed as suggested by @mafsi.
It could lead to clutter if the enter key didn’t have the same function as the tab key. So if you wanna change the name of the link, you use tab, and if you wanna just autocomplete, use enter.
Ah I see! That is indeed a way to get around the clutter. This makes it differently useful compared to the hotkey suggestion. Either of them would pretty much solve my use case, but both would be awesome.
Counterpoint: I have two vaults: one where I essentially never use the
| linking feature and one where I may use it more frequently. Because of that I don’t want something to break my current behavior, forcing me to hit TAB twice every time I make a link.
How are you currently using Tab? Typing [[, then the name of the note and then Tab doesn’t escape the closing brackets ]] so I fail to see why you would prefer using Tab over Enter. Hitting tab multiple times doesn’t help either.
But you are right, there are always unforseen usecases, so making a new feature (the hotkey suggestion) rather than modifying an old one and breaking someone’s workflow might be the better way to go.
You are right, I wrote that from memory. Tab only goes to the end of the text, it doesn’t move outside the link. I still have to use Enter to complete the link. Disregard my comment then.