kortina / vscode-markdown-notes

Install from: https://ark.dance/md-notes
GNU General Public License v3.0
427 stars 65 forks source link

Reverse Link Function #82

Open nixsee opened 4 years ago

nixsee commented 4 years ago

I'm currently creating various indexes that point to my notes. It would be really neat if there was a command that uses a search/autocomplete to create a link to the current file in the OTHER selected file. It is essentially the reverse of the current wikilinking function, where a link to the other file is created in the current file. It would need to go in some default place in the target file - in a YAML header above "---" perhaps?

Another related idea - some sort of Ctrl+Shift+Click feature to create a link to the current page in the page contained within the link that was clicked on (e.g. Page 1 has [[Page 2]] within it. This command would add [[Page 1]] to Page 2.

These features would be useful for making topical index notes - I have many index pages like "Inbox", "Nutrition", "Finance" which are full of links to specific pages on those topics. If I am on a new page on Vitamins that is not yet linked to Nutrition, I could add that link without having to open and type it. Or, in the header of Vitamins, I could manually add link in the header to Nutrition and Shopping List, and then create links in those summary pages by clicking.

I know there are backlinks, but this is an extra level of functionality.

kortina commented 4 years ago

Hmm, there are lots of things that would be pretty tricky (and probably a matter of user preference) to get this write (eg, where in Page 2 do you add the link?)

I'd prefer to work on the api https://github.com/kortina/vscode-markdown-notes/compare/ak-beta-api and allow people to implement this as they see fit.

nixsee commented 4 years ago

Fair enough! Leave this alone, or close it if you like!