-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
please add a new feature of updating existing toc #6
Comments
I have another question, 'toc' generated by your plugin, I cannot used it for navigate in documents, I used 'instant-markdown' for realtime preview. Do they the two plugins conflict with each other? |
@hitzhangjie For your second question, it seems 'instant-markdown' use CommonMark as its Markdown parser, CommonMark does not add anchor to headings automatic default, and TOC link relyon this feature. Maybe you can find some options in these plugins to turn on it. Unfortunately, different Markdown parser generate different anchor link for headlings, my current work is for GFM and Redcarpet, under CommonMark is untested. At company I'm using Windows, and 'instant-markdown' doesn't support Windows official, so I cannot test the situation you said now. If you find the realtime preview page's headings have anchor with them, could you provider a demo generated html file to me for analyze? Thanks. |
@hitzhangjie Updating existing toc is a good idea, I'll work on it when I got some free time. |
:/<!-- vim-markdown-toc \w\+ -->/,/<!-- vim-markdown-toc -->/d|execute 'normal! k'|GenTocGFM You can replace |
Oops, this plugin already provides a |
@sunaku Yeah, I updated the code yesterday to add @hitzhangjie You can use |
Awesome! ✨ Auto-update on save sounds great! 👍 Thanks @mzlogin. 🎅 |
First of all, thanks for your good work, it's very convenient to generate toc now. If you add a new feature like updating existing toc when triggering some hotkeys, it would be more useful. Is it right?
I have no vim script programming experience, but I think this is a good idea for some document which contains a long table of contents. If you add a updating-toc feature, we don't have to delete existing toc again. And I think inserting toc before the document is finished is useful too, because it can help us navigate the document.
So I think add a updating-toc feature is very useful. Thanks!
The text was updated successfully, but these errors were encountered: