I would like to avoid wiki links in my vault. So links will work in apps that do not recognize wiki links.
Things I have tried
I understand that even with wiki links turned off, if the file doesn’t exist, typing [[ will generate a wiki link. But if after creating a wiki link in this way I type [[ and enter the name of the file thus created, a markdown link will be created.
Why the distinction? Why not wiki links with wiki links turned on and markdown links with wiki links turned off, period?
Your title seems different than everything you say in your post. So first, I’ll address your title:
If Wikilinks is turned off, and you make a link that exists OR make a new link that doesn’t exist, Obsidian will format a Markdown link to the title you typed.
If it isn’t behaving that way, you might have a plugin causing issues, and you should try it in the Sandbox vault to double-check.
Typing [[ is just a quick shortcut to form a link. The resulting link should respect the link format settings you chose.
You can also use the command “Add internal link”, and again, it will format the link as Wiki or Markdown depending on what you chose in your settings.
There is no distinction. You can use “Add internal links” or “[[” with either setting.
Thanks, Rigamarole. I apologize for bringing up the issue again. I’ve been away from it forma while. And probably did not understand the forts time.
I don’t see the contradiction between my title and the content of my post. But that’s not important.
With wiki links turned off I do indeed get wiki links, not markdown links, if the file does not exist. What I read when I searched here on my question led me to believe that that is what is to be expected. The documentation is not clear on the topic. And that also is not important.
What’s important: What is the Sandbox? A model vault? In which you will see how things are supposed to work? And how do I access it?
Because in your title, you are saying the problem is that if a file doesn’t exist, it makes a Wikilink. That isn’t how it’s supposed to work. If that is happening, you might have a bug.
In your post, you talk about how you know it creates a Markdown link:
“But if after creating a wiki link in this way I type [[ and enter the name of the file thus created, a markdown link will be created.”
In your latest reply you say it is creating a Wikilink.
Here is a gif of me trying it.
I have Wikilinks turned OFF. I typed [[ and began typing the title of a note that does not exist.
Then I hit enter. Are you hitting enter to finish the auto-completion?
After I hit enter, it automatically forms a Markdown link, and adds all the %20 symbols for the spaces that it needs.
If you aren’t seeing this behaviour, then you should try disabling all community plugins, or using the Sandbox vault from the Help menu.
To use the Sandbox vault, open Help in Obsidian (the ? beside your vault name) and then “Sandbox vault”
(1) This link made when file did not exist: [](cucumber%20pie)
(2) This link made when file did exist: [cucumber pie](cucumber%20pie.md)
Turned community plugins back on:
(3) This link made when file did not exist:
[[zucchini pie]]
I would not call (1) a markdown link: there’s no file name, it doesn’t have the “md” extent. I suspect lacking those it would not work, in Vim. “%20” would probably be a problem too.
Whatever, Obsidian considers it a markdown link. But (3) is what I get when community plugins are turned on, wiki links is turned off, and the file does not exist.
Presumably some plugin is causing the problem. How do I determine which one? Disabling one at a time to see when the problem is eliminated?
After going through my plugins list, disabling one at a time, I didn’t find one that cause the problem.
Returning here to report my results, I notice that in your demo you hit “return” after entering the filename.
I went back to Obsidian and tried doing that and I got what you got, what you call a markdown link.
My practice in the past was to just accept the link, to not bother doing “return” when all I saw were double brackets on either side of the name that I had entered.
I still wonder whether this “markdown link” will work as a link outside of Obsidian.
I’ll check it out in Vim. Gotta run right now, though.
The results of my test of Obsidian’s “markdown links” in Vim:
I created a file with two such links:
(1) [](aaaanuther%20file)
(2) [aaaanuther file](aaaanuther%20file.md)
(1) and (2) link the same file and function identically, except that (1) doesn’t display unless the cursor is on the line. Hitting return with the cursor on the link opens a blank file with the Obsidian URL as the name.
Call it a “markdown link” if you want. It certainly doesn’t function as one in Vim. And probably not in any that don’t recognize it as such. Are there any?
So my original problem—that I was getting wiki links when I wanted markdown links—is not a problem. The problem is that what Obsidian calls a markdown link is not recognized as such by Vim, and probably not any other markdown reading app.
No doubt Obsidian has good reasons for its URL. But it makes its claim to interoperability untrue.
I have the Link Converter plugin installed but not activated. I have been keeping it available in case I want to start editing my Obsidian files with Vim.
I have been assuming that one of the options it provides is converting Obsidian markdown links to markdown links that will function as such in Vim.
In light of what I’ve learned in the context of this thread, I’ll bet the only markdown related option is converting wiki links to Obsidian style markdown links. Which would be no help to me at all.
You aren’t talking about “Vim” you are talking about what, “VimWiki” right?
VimWiki currently ships with 3 syntaxes: VimWiki (default), Markdown (markdown), and MediaWiki (media). Of these, the native VimWiki syntax is best supported, followed by Markdown. No promises are made for MediaWiki.
VimWiki supports wiki links. And even recommends them.
I wish you luck finding a solution that suits you. I’m bowing out.