mzlogin / vim-markdown-toc

A vim 7.4+ plugin to generate table of contents for Markdown files.
http://www.vim.org/scripts/script.php?script_id=5460
MIT License
613 stars 59 forks source link

Add support for closing fence text and hidden markdown style #51

Closed whitedwarfsun closed 6 years ago

whitedwarfsun commented 6 years ago

Add vmt_fence_closing_text

There are other editors that create TOCs together with corresponding marks. Some of them add additional strings to the closing mark, e.g. for the opening fence mark TOC they use /TOC for the closing mark.

With vmt_fence_closing_text it is now possible to adapt to this situation.

Add hidden markdown style

If you do not want to have markdown style appear in fence for table of contents you can now set a default markdown style that is applied if the main fence text is found but a markdown style is missing within the fence. Set g:vmt_fence_hidden_markdown_style to a markdown style that is supported, i.e. g:supportMarkdownStyles should contain g:vmt_fence_hidden_markdown_style.

mzlogin commented 6 years ago

Thanks for your PR.

I'll review it later.

mzlogin commented 6 years ago

Merged. Thanks a lot!