I started to use markdown to take notes.
I use marked to view my markdown notes and its beautiful.
But as my notes get longer I find it diff
Anchor tags generated by different Markdown parsers are not even.
If you are working with Markdown parsers GFM (GitHub Flavored Markdown) or Redcarpet, I wrote a Vim plugin to handle table of contents.
Generate table of contents for Markdown files.
Supported Markdown parsers:
Update existing table of contents.
Auto update existing table of contents on save.

Generate table of contents
Move the cursor to the line you want to append table of contents, then type a command below suit you. The command will generate headings after the cursor into table of contents.
:GenTocGFM
Generate table of contents in GFM link style.
This command is suitable for Markdown files in GitHub repositories, like README.md, and Markdown files for GitBook.
:GenTocRedcarpet
Generate table of contents in Redcarpet link style.
This command is suitable for Jekyll or anywhere else use Redcarpet as its Markdown parser.
You can view here to know differences between GFM and Redcarpet style toc links.
Update existing table of contents manually
Generally you don't need to do this, existing table of contents will auto update on save by default. If you want do it manually, just use :UpdateToc command.
https://github.com/mzlogin/vim-markdown-toc