gitmyhub

MarkdownTOC

★ 0 updated 2mo ago ⑂ fork

SublimeText3 plugin which generate a table of contents (TOC) in a markdown document.

A Sublime Text 3 plugin that automatically generates and updates a table of contents in your Markdown documents based on headings, keeping it in sync every time you save.

Sublime Text 3PythonMarkdownsetup: easycomplexity 2/5

MarkdownTOC is a plugin for Sublime Text 3 that automatically generates a table of contents inside a Markdown document. Instead of manually writing and updating a list of sections at the top of your README, wiki, or documentation file, you run a command and the plugin builds the list for you based on your headings.

Once installed, you place your cursor where you want the table of contents to appear and pick the plugin from the Tools menu. The plugin scans the rest of your document for heading text, generates a linked list, and inserts it. Whenever you save the file, the table of contents updates itself automatically—adding new entries for new headings and removing ones you deleted. You can also configure how it behaves by adding small attributes to the generated tags, such as choosing how deep the list goes, whether entries are clickable links, and how non-English characters are handled.

This is for anyone who writes long Markdown files in Sublime Text—open-source maintainers, technical writers, or project managers maintaining documentation. If you have a README with 20 headings and you add a new section near the bottom, the table of contents at the top stays in sync without you doing anything.

One notable detail is that the table of contents only considers headings below where you insert it. Anything above the insertion point is ignored, which keeps the generated list from referencing itself. The plugin also supports link styles that match GitHub's rendering, so clickable entries work correctly when you push the file to a repository.

Where it fits