Open tompropst opened 2 years ago
As with #1208, I'm pretty sure the answer here is that VimWiki doesn't support mixing file extensions within a single wiki, and I think that adding that behavior would be more complexity than it's worth. That said, I want to spend some time making sure my read on this is correct before closing this issue.
Edit: I'll add that I'd be happy to help figure out a rename on existing files, if that'd be useful. My goto would probably be rename and some sed
incantation, but there might be better options if on Win/Mac...
Thanks for the offer, @brennen. I can tackle cleaning up my project to use a single extension. I don't necessarily think VimWiki should support mixing file extensions but it seems like it has "partial support" now. I debated opening this issue but thought it was worthwhile since the issue happens even if you are not intentionally trying to mix extensions.
For example, say a user copies a markdown file into their wiki but it has a different extension. In this situation, they should rename it but may not think to do that. If they then generate links, they will get a link for the file (the "partial support") however the link will not work. Unless they check / test each link, it may go unnoticed. If they are exporting to HTML the error will propagate.
I don't necessarily think VimWiki should support mixing file extensions but it seems like it has "partial support" now. I debated opening this issue but thought it was worthwhile since the issue happens even if you are not intentionally trying to mix extensions.
Yeah, I think it would be good for the documentation to be clearer about this, at minimum, and some software archeology is warranted to figure out intent of the existing features. It does sound like something's off with the link generation.
(Thanks for being understanding, and apologies if I came across a bit short in my replies to these issues. I know how frustrating it can be to get a "closed wontfix" on an issue you've encountered and put the time into articulating clearly.)
Your responses here have been very thoughtful and appropriate. I appreciate the quick feedback.
I don't have any experience with Vim plugin development so I haven't yet figured out how this is working. I will definitely submit a documentation PR if I come up with anything that helps.
With markdown as the syntax, all markdown files are included in generated links but any files with an extension that differs from the wiki extension will have broken links.
In addition to, or perhaps as a replacement for the
vimwiki_markdown_link_ext
option, it might be useful to have an option to include the file extension in links regardless of syntax, and preserve the original extension during link generation.Using markdown syntax with these settings:
Reproduction:
.md
set as the extension, create a file in the wiki directory with a.markdown
extension..markdown
file is included in the generated links but the link is broken.Expected:
let: g:vimwiki_markdown_link_ext = 1
, to include the extension in links...:VimwikiShowVersion
[x] Checkout the
dev
branch and confirm the issue is present there as well.[x] Post the syntax you are using (default/mediawiki/markdown) and your vimwiki settings from your
.vimrc
[x] Provide a detailed description of the problem including steps to reproduce the issue.
[x] Include the output of
:VimwikiShowVersion
.