Open PlasmaHH opened 5 years ago
Thanks for your suggestion.
Let me retell your scene,
# heading1-1
<-- you want to insert toc here
## heading2-1
# heading1-2
## heading2-2
is that right?
Yes, exactly. Though other positions should probably work too ;)
I think I get the drift. But I want to know, why don't you insert toc in the following two positions
<------------------- position 1
# heading1-1
## heading2-1
<------------------- position 2
# heading1-2
## heading2-2
This is just the style my/our readmes are constructed, for a bit more context imagine:
Hi~I add an option g:vmt_include_headings_before
to support this.
So you can add let g:vmt_include_headings_before = 1
in your vimrc file now.
Could you please feedback your result? Thanks a lot!
Indeed it works as expected
Currently it looks like the plugin ignores all headings above the point where you insert it. This leads to the case that when it is inserted under a # heading and after the toc comes a ## heading, the generated markdown list starts with an indentation, which will not be rendered as part of the list. Therefore the plugin should have an option to also include all the headings that are before its insert point