michal-h21 / vim-zettel

VimWiki addon for managing notes according to Zettelkasten method
MIT License
559 stars 73 forks source link

Support backlinks for another type of anchors #54

Closed againxx closed 4 years ago

againxx commented 4 years ago

Thank you for this great work!

According to vimwiki's description of anchors, every header, tag, and bold text can be used as anchors. The VimwikiBacklinks command can list all of these types of anchors. However when using ZettelBackLinks , it seems only full links without # are recognized and generated below the Backlinks section.

Output of VimwikiBacklinks zettel1

And output of ZettelBackLinks zettel2

Links of this form [[title#bold text]] are ignored. A support of titles and bold texts may allow fine-grained references between notes.

michal-h21 commented 4 years ago

You are right, the regular expression used for back link detection didn't expect anchors. It should be fixed now.

againxx commented 4 years ago

Thank you for your quick reply! After updating to the latest version, I came across a new error when I used ZettelBackLinks. I am using dev branch of vimwiki, so maybe due to the interface inconsistency?

zettel3

michal-h21 commented 4 years ago

Ah, it seems they removed the variable we used for decting of the development version of Vimwiki, so the version for older versions of Vimwiki was used. I've removed the deprecated code, so it seems to work with both main and devel versions of Vimwiki now.

againxx commented 4 years ago

Thank you so much! It works perfectly now!