Open guilhermeprokisch opened 3 years ago
It could be probably done using the BufWritePost
auto action provided by Vim. There are two problems: not all pages need to have backlinks (at least the index page, tag index, etc.), so you need to check if the current page contains backlinks first.
Second issue is more serious - at least for me, each time I run :ZettelBacklinks
, it doesn't update the existing links, but it adds them above the existing links, so you would get lot of duplicates quickly. This issue needs to be fixed first.
But I like this idea and I will hopefully come with the solution.
It could be probably done using the
BufWritePost
auto action provided by Vim. There are two problems: not all pages need to have backlinks (at least the index page, tag index, etc.), so you need to check if the current page contains backlinks first.Second issue is more serious - at least for me, each time I run
:ZettelBacklinks
, it doesn't update the existing links, but it adds them above the existing links, so you would get lot of duplicates quickly. This issue needs to be fixed first.But I like this idea and I will hopefully come with the solution.
I have no idea how to code this, but what if the :ZettelBacklinks & ZettelInbox inserted those links contained within some kind of tag like [BL][/BL], so that when it is updated, it can easily be replaced with regular expressions or something?
Second issue is more serious - at least for me, each time I run
:ZettelBacklinks
, it doesn't update the existing links, but it adds them above the existing links, so you would get lot of duplicates quickly. This issue needs to be fixed first.
I have this issue as well. Is this being tracked in a separate issue?
It's is possible to automatically run the ZettelBackLinks on the file save?