I prefer using “Shortest path when possible” with my internal links. But when I consider compatibility with other editors and viewers, I’m feeling the need to switch my settings to “Relative path to file”.
Some people want to see all the information in the preview. Some people don’t.
It would be great to have an additional setting that auto-generated a pretty link in our markdown when these long link formats are set.
For example,
When [[Review Cafe]] is entered in Edit mode, currently this is generated:
An issue that I’ve noticed with either using standard markdown links or Obsidian’s “Wikilink Pipe” to change the appearance of the text in preview mode is that when the file that the link points to gets renamed the “pretty” text does not get renamed as well.
I can see situations where it would be preferable for it to be renamed too, as well as others where it would not.
I was originally using relative markdown style links out of concern for compatibility with other software, but once I noticed the pretty text not being renamed I gave up on that. I now use wikilinks & “shortest possible”. It’s the only way that I’m guaranteed that the pretty text will always be the same as the file name.
I reasoned that with a proper markdown export as well as a mobile app on the way, if I ever needed to work on something with a 3rd party app that I could just export it as proper markdown.
Although I’d definitely much prefer an option that would allow me to use 3rd party software without having first to export it to proper markdown.
When creating new links, I use the Absolute path in vault setting under Settings > Files & Links > New Link Format because I like to see exactly where a file lives in the vault.
I also find myself manually adding the page title after that so it looks nice when I preview it, so for example:
[[People/Smith/John Smith|John Smith]]
I’d like to see a way to have the page title automatically appended to the link so I don’t have to do it manually.
Proposed solution
Add another toggle to the Files & Links page, Add page title to auto-generated internal links or something, which when enabled, would mean auto-generated internal links would go from [[People/Smith/John Smith]] when inserted, to [[People/Smith/John Smith|John Smith]] when inserted
Current workaround (optional)
Currently doing it manually. It’s not too difficult, but it gets tedious when I’m working with a lot of links.
I agree with the feature request, sounds like a good idea.
You could make a slightly better workaround by using Templater and hitting one hotkey to automatically update your links.
Assuming your cursor is directly after a link having just inserted it, the Templater script would:
Read the contents of the file up to the current cursor position.
Regex to find the page name of the last link in the contents.
tp.file.cursor to move the cursor to the left of the closing link ]]
tp.file.cursor_append to add |Page title
tp.file.cursor to move the cursor to the end of the link again
You could make this even more efficient by putting your own file-chooser in the script and using your hotkey to insert all links, but you might just want to augment the default link inserting rather than replace it.