vscode-markdown icon indicating copy to clipboard operation
vscode-markdown copied to clipboard

Support "WikiLink style double bracket link"

Open bugrasan opened this issue 4 years ago • 7 comments

Proposal

Support wikilink-style double square brackets link.

This doesn't comply with the default Markdown guidelines, however will make linking personal notes a lot faster.

This is already supported by the Markdown Preview Enhanced extension, however they both conflict with each other on preview.

Examples

  • [[WikiLink]] is equivalent to [WikiLink](./WikiLink.md)

  • [[Wiki Link]] is equivalent to [Wiki Link](./Wiki_Link.md)

References

bugrasan avatar Mar 14 '20 21:03 bugrasan

Thanks for the feedback.

This is already supported by the Markdown Preview Enhanced extension, however they both conflict with each other on preview.

MPE has a standalone preview tab, it shouldn't conflict with the VSCode's 😳.

See https://github.com/yzhang-gh/vscode-markdown/issues/531#issuecomment-590205121.

yzhang-gh avatar Mar 15 '20 01:03 yzhang-gh

Would love to see this feature! In this repo it is already prototyped: https://github.com/kortina/vscode-markdown-notes

jay-pee avatar Apr 04 '20 18:04 jay-pee

In my usage, the wiki style links work when "Markdown Preview Enhanced" is enabled and "Markdown All In One" is disabled. Then, I enable "Markdown All In One" and restart VSCode and the wiki style links do not render in the preview. They remain the plain text "[[my page]]". Links in the standard markdown format still work.

rcorty avatar Apr 29 '20 20:04 rcorty

I just found I put the wrong link above. It should be https://github.com/yzhang-gh/vscode-markdown/issues/531#issuecomment-590205121.

These two extensions have different preview panes. The only problem is they use the same keyboard shortcuts (e.g. ctrl+k v). Please remove the one of this extension using VSCode's "keyboard shortcuts" configuration page.

img

yzhang-gh avatar Apr 29 '20 23:04 yzhang-gh

Thank you -- it is now working. For future new users....

  1. Type apple-K, apple-S to bring up the keyboard shortcuts config page
  2. Click the picture of the keyboard to start recording keys
  3. Type apple-K, V to bring up all commands that run off this shortcut
  4. Delete all except "Markdown Preview Enhanced: Open Preview to the Side"

rcorty avatar Apr 30 '20 14:04 rcorty

This has been implemented in vscode-markdown-notes , e.g. see this line of code https://github.com/kortina/vscode-markdown-notes/commit/6988b55212a0f94b23349a9f75edb74eb47fce23#diff-d0f94c09f0d27c1e3261e6b2b3b6ee61f7826fa47aa8db9874f20806f6c4d2c6

xinbenlv avatar Jan 08 '22 23:01 xinbenlv

This would do a very lightweight personal wiki purely based on Markdown all in one. The autocompletion facility is already there for regular links. What's missing:

  1. Triggering autocompletion on [[
  2. Removing the .md extension
  3. Inject syntax for [[...]]
  4. Enable wikilinks in the preview

Except for 4, I have dealt with code for this in Foam and it's rather simple. I don't have the time to code this right now but I could show you some examples.

memeplex avatar Apr 25 '22 11:04 memeplex