Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Create Markdown TOCNew to Visual Studio Code? Get it now.
Create Markdown TOC

Create Markdown TOC

Jon Rumsey

|
39 installs
| (0) | Free
Adds a table of contents to your markdown file.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Create Markdown TOC README

Locates all Level 2 headings in the currently selected markdown file and creates a clean, orderly table of contents near the top that links to all Level 2 heading labels for simplified navigation.

Features

  • Creates a Table of Contents in the currently open markdown file.
  • Links to Level 2 heading IDs are stored in Table of contents.
  • Uses the VSCode Command Palette to insert the new table of contents.
  • Supports # character Headings ('Open ATX') markdown.

About This Extension

Open a markdown file with headings in it

Open a Markdown File with Headings in it.


Open the Command Palette and find Create Table of Contents command

Open Command Palette to find "Create Table of Contents".


Select the command and all Level 2 headings will get linked using Heading IDs

Select the command and a Table of Contents will be created with Heading IDs linked up.


Requirements

The only dependencies are `vscode ^1.79.0 and those listed in devDependencies in the package.json file in my GitHub Project Repo.

Extension Settings

Contributes.Command: markdown-toc.createTOC "Create Table of Contents"

ActivationEvents: none.

Known Issues

  • No support for 'next-line' heading markdown that uses = or - as Heading level indicators.
  • No support for 'closed atx' style headings.

Note: See GitHub Issues List for the most current status.

Release Notes

  • Bugfix and feature update.

See CHANGELOG.md for detailed release notes.


Credits

Design, code, test, and publisher: Jon Rumsey GitHub LinkedIn

References

  • Markdown Rules guidance from DavidAnson's Markdown Lint repo
  • GitIgnore suggestions from TopTal.com
  • Guidance on how to create a VS Code Extension from VS Code Docs
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft