0

Is there a way to do this? I've got some heavy scripts with a lot of lines in my code. Is there a way to put "quick links" to parts of my code in some kind of legend or glossary? I'm using Visual Studio Code. It would save a lot of scrolling time.

I've had a look but I can't find anything. Maybe there's an add-on?

edit: I am coding in python within Visual Studio Code. But I would hope that this translates to any code. It doesn't feel like it should be a code specific feature. It would just be jumping to a line somewhere in the file.

Thank you!

ardoknow
  • 1
  • 1
  • Does this answer your question? [Can I add links in comments to a code block in Visual studio?](https://stackoverflow.com/questions/3760491/can-i-add-links-in-comments-to-a-code-block-in-visual-studio) – Ken Y-N Dec 13 '22 at 07:33
  • Could you please clarify: What are you writing, which language? You can probably put your parts into different files. I am not aware of quick links in any way tbh. – Dugnom Dec 13 '22 at 07:34
  • I was going to mark this as off-topic, but it seems actually to be a duplicate. Skip over the Accepted Answer and [view this one](https://stackoverflow.com/a/72100939/1270789) that describes the exact feature you need, although only for Java/TypeScript. – Ken Y-N Dec 13 '22 at 07:35
  • Thank you for your responses! I don't think any of those links answer my question. I checked through the entire threads. I would want to hyperlink to a line in the code. I'm coding in python but if the feature exists I would imagine it wouldn't matter. I just want to go to a designated line. – ardoknow Dec 13 '22 at 07:45
  • Does the `Outline` view help? – Mark Dec 13 '22 at 17:22

1 Answers1

0

If you want a legend to jump to some Part of your current code file you can use the extension HTML Related Links (better name would be Related Links but historically it was only for HTML files)

Look at Example 4 how you can make a TOC using special comment lines.

rioV8
  • 24,506
  • 3
  • 32
  • 49