Make goto_index obey wiki_link_extension#208
Conversation
This is slightly more complicated, I think. One idea with wiki.vim is that it should "just work". You could have multiple wikis; the Still, I see your point, and perhaps my comment is to principled. I.e., this PR will fix your problem, and I don't think it would break my personal work flow. So a pragmatic choice might be to accept this and instead react to new issues if this would break anyone elses workflow...
Happy you like it! :) |
|
Yea, my fix was rather easy so I thought there might be a "philosophical" reason :) Completely up to you what you decide to do. How does |
wiki.vim/autoload/wiki/url/wiki.vim Lines 41 to 58 in e233583 I hope the above may be helpful to explain how things work. Feel free to ask follow-up questions. And so:
I believe that it may be better to improve the resolver wrt. the index extension thing. And so, to be more clear: I believe it would be good to create some concrete examples of what you are trying to do and how you expect wiki.vim to behave. You write:
Can you explain this in more depth? Preferably with concrete, minimal examples. |
|
Sorry for the delayed response. Time has not been in abundance, and will not be in the foreseeable future, so I will (temporarily?) close this PR. Thanks for your explainations. I think my confusion is related to the scenario of having multiple wikis, which I had not considered as a use case. I will look at the resolver if I get back to this problem. As for an in-depth explanation of my the behavior I saw vs my expectations.
I do not expect you to take time to follow up on this, since I do not have time myself, and I am fine with the above (I can simply remove index.md from my wiki folder, which was only used for initial testing). I submitted this PR thinking that it might have been an edge case that had not been considered (since I believe that not many users have index.md and index.wiki). Once again, thanks for this plugin, and your general vim inspiration :) |
No problem!
I tested, and I can reproduce your problem even without |
|
I believe this is fixed now. Please test on your end. Thanks for reporting; this has now resolved a slight annoyance for myself as well :) |
|
Glad I was able to communicate the problem :) I have tested with the master branch, which includes the commit linked above, but I still see the same problem (index.md is opened when pressing \ww from test.md) |
|
Sorry for the late reply! I've tried to replicate your problem, but I can't. I have these files: The contents of the set nocompatible
set runtimepath^=~/.local/plugged/wiki.vim
filetype plugin indent on
syntax enable
let g:wiki_root = fnamemodify("wiki", ":p")
let g:wiki_filetypes = ["wiki", "md"]
let g:wiki_link_extension = ".wiki"
let g:wiki_link_target_type = 'md'
runtime plugin/wiki.vim
edit test.md
WikiIndexI start neovim with
Edit: Updated example. Can now reproduce! |
|
I think it is fixed now, please test. |
Need the index.md file for the link extension test. refer: #208
|
It works! Thanks :) |
|
Glad to hear it! :) |
I experience the following issue, which I believe to have fixed:
I have
let wiki_link_extension='.wiki'. When I have a markdown file open (from random editing) and want to open the wiki index (pressing ww), I'm brought toindex.**md**instead ofindex.wiki(both files happen to be in my root folder).The following fix adds g:wiki_link_extension to g:wiki_index_name.
Thanks for a great plugin btw!