You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to limitations in vim / neovim markdown links / wiki links will cause weird wrapping behaviour. This is not something that will be fixed any time soon.
Make it easier to use reference style links. I have installed link.vim and it works pretty well.
The wrapping issue is much less of an issue when the links are done this way:
# Notes[Vim][0] and [Neovim][1] are text editors.
[My dog][2] is 5 years old
## Links[0]: https://example.com/very/long/path/with/many/segments/and?param1=value1&really_long_parameter_name=extremely_long_value_that_keeps_going[1]: https://anotherexample.com/very/long/path/with/many/segments/and?param1=value1&really_long_parameter_name=extremely_long_value_that_keeps_going[2]: my-dog.md
So what is missing?
smart_action should follow internal reference style links
follow_url_func should have the url value populated by the matching reference entry (if valid url)
(Also: i have opened a related feature request in link.vim to support converting internal markdown links to this style also, as it currently only supports urls)
Alternatives
Create a wrapper function for the smart_action myself.
Additional context
I don't know if there would be a wikistyle equivalent. Perhaps it is wisest to restrict oneself to just markdown link styles for this so that we don't need to come up with new syntax.
I am using this plugin together with render-markdown for the rendering part. This feature request is only about the smart action.
To sum up: I propose that we improve smart_action and follow_url_func by understanding reference style links. This would help alleviate a major and currently "unsolvable" problem with using neovim for obsidian.
Update: 2024-11-26
link.vim is starting to support this in its dev branch and it looks very promising. Regarding obsidian.nvim I realized that what would really be nice is to have another option
-- Either 'wiki', 'markdown' or 'reference'preferred_link_style="reference",
which would add links like this
[This][0] is a link to a file.
## Links[0]: filename-here.md
Read through qadzek/link.vim#14 for details / variants. A complication is that the link has to be inserted in the right place and any links after it has to be incremented. Also, there has to be an option for reference list header (eg. "Links" as in the example above)
I feel this is right on track. If this isn't implemented in this plugin I'll find away around it (build my own smart action function) but I do think this should be interesting to more people and just me. As a fallback - if you do not want to or have the capacity to implement it - it could perhaps be added to the README.md (instruction on how to use this plugin together with link.vim).
The text was updated successfully, but these errors were encountered:
🚀 The feature, motivation and pitch
Background
Due to limitations in vim / neovim markdown links / wiki links will cause weird wrapping behaviour. This is not something that will be fixed any time soon.
Suggestion
Make it easier to use reference style links. I have installed link.vim and it works pretty well.
The wrapping issue is much less of an issue when the links are done this way:
So what is missing?
smart_action
should follow internal reference style linksfollow_url_func
should have the url value populated by the matching reference entry (if valid url)(Also: i have opened a related feature request in link.vim to support converting internal markdown links to this style also, as it currently only supports urls)
Alternatives
Create a wrapper function for the
smart_action
myself.Additional context
I don't know if there would be a wikistyle equivalent. Perhaps it is wisest to restrict oneself to just markdown link styles for this so that we don't need to come up with new syntax.
I am using this plugin together with render-markdown for the rendering part. This feature request is only about the smart action.
To sum up: I propose that we improve
smart_action
andfollow_url_func
by understanding reference style links. This would help alleviate a major and currently "unsolvable" problem with using neovim for obsidian.Update: 2024-11-26
link.vim
is starting to support this in its dev branch and it looks very promising. Regardingobsidian.nvim
I realized that what would really be nice is to have another optionwhich would add links like this
Read through qadzek/link.vim#14 for details / variants. A complication is that the link has to be inserted in the right place and any links after it has to be incremented. Also, there has to be an option for reference list header (eg. "Links" as in the example above)
I feel this is right on track. If this isn't implemented in this plugin I'll find away around it (build my own smart action function) but I do think this should be interesting to more people and just me. As a fallback - if you do not want to or have the capacity to implement it - it could perhaps be added to the
README.md
(instruction on how to use this plugin together withlink.vim
).The text was updated successfully, but these errors were encountered: