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

Support for Links to Headings

Open 1dancook opened this issue 4 years ago • 5 comments

There is a todo note in the readme about support for linking to headings. I did not see an issue for this (closed or open) so I'm making one.

Please support links to headings. Syntax:

[[file.md#heading]]

It could be good if you could peek the heading location as well.

Thanks!

1dancook avatar Jun 03 '20 13:06 1dancook

Agree, this would be great! Shouldn't be terribly hard to do, and would also be a good oppy to clear up any collisions between wiki-link and tag regexes.

kortina avatar Jun 03 '20 15:06 kortina

Do you have any suggestions for getting started on a PR for this feature?

stemcc avatar Jun 24 '20 02:06 stemcc

For markdown files the symbol tree consists of the headers in the document. I think if you execute the command vscode.executeDocumentSymbolProvider you could get a list of headers for any markdown document.

Anyway this isn't a solution in general but at least you don't have to write any parsing code to find the headers. vscode does all the work for you automatically since the markdown language server is built in.

lukesmurray avatar Aug 06 '20 20:08 lukesmurray

+1 for this idea.

astrelochnik avatar Aug 12 '20 17:08 astrelochnik

+1 from me as well. Linking between notes been a weak point of several markdown editors, and it's holding up use-cases where you have extensive documentation in markdown and want to link up to a specific section.

rshalaev avatar Sep 10 '20 17:09 rshalaev