-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request. Links: inserting the link title from a linked file header #149
Comments
This seems like a good idea that should not be too hard. I propose a function and a normal mode nmap <leader>wlh <plug>(wiki-link-fetch-header) What do you think? Note: this should work with both Markdown and wiki style links. |
👍 Sounds good to me. Could we make it work in visual and do the same for a selected range? Thus to ease the task if many links. |
Yes, perhaps, but lets start with the simplest stuff first. Visual mode will require some more thought and discussion on how it should work, so I suggest you open a new issue on that when this issue is resolved (this helps keep things focused, which is good for me since I don't have that much time to work on stuff like this). |
I've pushed an update now - it's not finished, but it is something. The mapping is not created yet, but you can test by doing |
Great! Tried on several links with absolute and relative path, then with a header down many lines below. Works smoothly. Found issue with journal links like 2021-05-13-2218. It didn't fetch a header. |
I've pushed an update where |
Hello, thanks for this tool! I switched to this from VimWiki.
Could we have a header inserted into a link title? Probably a function that in normal or visual mode insert a title for a link under cursor from a linked file first header. That file is in markdown.
Example:
index.md
:test.md
:Preamble content # First header in test.md The content itself
vimrc
:Environment:
The text was updated successfully, but these errors were encountered: