jonathanyeung / mark-sharp

Mark Sharp WYSIWYG Markdown Editor for VS Code
36 stars 0 forks source link

Support for WikiLinks #8

Closed viktomas closed 4 months ago

viktomas commented 4 months ago

Is your feature request related to a problem? Please describe.

Many note-taking apps that provide WYSIWYG markdown editors (Obsidian, Foam, Zettlr, Logseq) support WikiLinks to link between documents in your folder/repository. If I would use Mark Sharp, I'd need to be able to navigate between documents with WikiLinks

Describe the solution you'd like The WikiLink is a name of the document encosed in [[]] brackets.

There are two common implementations:

Tool-specific documentation:

Describe alternatives you've considered I'm currently using Zettlr but I do it only for the WYSIWYG editor, mark sharp would help me move back to VS Code

Additional context I understand that this might be out of scope of a custom Markdown editor. I wonder if it's possible to implement the feature as "when user clicks the wikilink, we invoke a configurable command with the wikilink content as an argument". That would decouple the editor (mark sharp) from implementations.

If this was open source (but I understand why it isn't), I would probably contribute the feature.

jonathanyeung commented 4 months ago

Hi @viktomas - thanks for the feedback. Wikilink support was added in version 1.2.0 - can you check which version of Mark Sharp you're using?

Usage notes for wikilinks can be found here: https://github.com/jonathanyeung/mark-sharp/blob/main/user-guide.md#wikilinks - but in a nutshell, you can do [[foo]] to create a wikilink to a file called foo.md that's in your currently opened folder or workspace. You can also do [[foo#section-1]] to link to foo.md and have it scroll to a header with the text Section 1.

A couple of usability notes:

Let me know if you have feedback on the experience or if it's still not working - thanks!

viktomas commented 4 months ago

Thank you for the response @jonathanyeung, I didn't see it mentioned in the feature set.

I use the latest version 1.2.2 and WikiLinks work.

I purchased a license. Thank you for the great extension 🙇

I have two pieces of feedback:

Let me know if these two features seem reasonable. If you would consider adding them, I can create separate issues for them.

I totally understand that $12 doesn't really give me a vote in selecting features. However, I believe people using Mark Sharp for knowledge bases would appreciate both features.

jonathanyeung commented 4 months ago

Thank you so much for the support @viktomas - it's very much appreciated!

And I welcome all feature suggestions, but especially those from premium customers! 🤗 Your two suggestions both make sense - please do create issues for them so that I can track it on my backlog.

viktomas commented 4 months ago

Thank you @jonathanyeung, I created the one issue that I really care about https://github.com/jonathanyeung/mark-sharp/issues/10 (visual treatment of wikilinks). I use https://github.com/foambubble/foam for the more complex interactions with wikilinks :+1: