Generate and update magically a table of contents based on the headlines of a parsed markdown file in Atom.
This project is based on Darius Morawiec's markdown-toc and the jokinkuang's fork.
Open Atom's command
palette
with Ctrl+Shift+P and search for TOC. As alternative, you can use the
Packages > Markdown TOC
menu, which is also available in the right click
contextual menu (Toggle Markdown TOC
).
md-toc:create
: create the TOC (shortcut is Ctrl+Alt+c)md-toc:update
: update the TOC (shortcut is Ctrl+Alt+u)md-toc:delete
: delete the TOC (shortcut is Ctrl+Alt+r)md-toc:toggle
: toggle the TOCapm install md-toc
or
cd ~/.atom/packagesgit clone git@github.com:ponsfrilus/md-toc.git
# A 1
→ #a-1
depthFrom:1
and depthTo:6
withLinks:1
updateOnSave:1
orderedList:0
#
## Table of Contents
with title:[0,1]
tabSpaces:4
. 0 for hard others for soft.@Editor.tabLength
or 2 if not set.skip:[0|n]
-
or *
for unordered list in TOCTo change the configuration, change
the value in text (this is the default):
<!-- TOC titleSize:2 tabSpaces:2 depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 skip:0 title:1 charForUnorderedList:* -->
and then update
the TOC (shortcut is Ctrl+Alt+u).
Thanks to all contributors for any fix or improvement, whether small or large.
Don't be shy and feel free to contact me on Twitter.
The package is Open Source Software released under the MIT license.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.