Wiki links require knowing extension
CompletedI'm not sure this is a bug. I've searched the comments and haven't seen this issue addressed specifically. Sorry if I missed something.
I've been using nvALT (and some alternatives) for years. My text files are sometimes .txt and sometimes .md.
In the current version of nvUltra, the auto-completion of wiki links includes the extension. In versions of nvALT, however, the autocompletion never worked consistently for me, and I have numerous links that do not have an extension in the link name (e.g., "[[test]]" instead of "[[test.md]]").
Working now in nvUltra, if I click on the "[[test]]" link, and my default extension is not the same as the target file, then it creates a new note instead of finding the already existing one. For example, suppose txt is the default extension. Further suppose I have a file titled test.md and a wiki link in A.md to [[test]]. If I click on [[test]], nvUltra will create a file titled test.txt instead of taking me to test.md.
This is all understandable, since extensions matter. But it seems reasonable to think that's not what the user would be expecting.
I realize this could be a very narrow 'me' problem. I suspect that other users might have a similar issue, but I'm not sure. Is there a way to treat links with the same name (minus the extension) as similar?
-
Correct. If you have 2 files (`file.txt` and `file.md`) and a wikilink (`[[file]]`), there is no way to guess what your intention was. If the extension is left off, then nvUltra does append the default extension for you.
My recommendation would be to rename all files to use a consistent extension(which would be the extension you set as default of course), and then it won't matter whether your wikilinks include an extension or not.
0 -
For reference, nvALT wiki links simply put whatever text was in the brackets into the search field, so it would find any file matching that text. In its present state, nvUltra is just more specific about handling wiki links.
0 -
Thanks both!
0 -
Hey,
I can't open wikilinks without extensions, whereas all my files are .md and it is also the default in nvUltra. Any idea why? (It opens an empty page when I click them).
It would be very nice to be able to use the old nvALT way of just putting the link into the search.
0 -
Related to the way the [[hyperlinks]] are generated, my comment on another thread points out the problem with trailing spaces in new files generated from a wikilink.
Assuming these files do not exist and that .md is the default extension, [[foo]] and [[foo ] each generate a file: respectively, foo.md and foo .md. I expect most would find this to be an undesirable behavior. I suggest considering implementing this the same way that nvAlt handles wikilinks, by not creating a hyperlink when the text has a trailing space...
0 -
Steve Daviss -- I'll have to think about this one. Not to seem snarky, but this seems like user error. Don't put the space in there if you don't want it, right? I wouldn't expect nvUltra to convert `[[foo bar]]` to `[[foobar]]`, and while I never intentionally put trailing space in my filenames, I can't say that it is "wrong" per se.
0 -
Raphaël Huleux -- fixed in an upcoming release.
0
Please sign in to leave a comment.
Comments
7 comments