Git Product home page Git Product logo

Comments (6)

mzlogin avatar mzlogin commented on May 17, 2024

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?

from vim-markdown-toc.

PlasmaHH avatar PlasmaHH commented on May 17, 2024

Yes, exactly. Though other positions should probably work too ;)

from vim-markdown-toc.

mzlogin avatar mzlogin commented on May 17, 2024

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

from vim-markdown-toc.

PlasmaHH avatar PlasmaHH commented on May 17, 2024

This is just the style my/our readmes are constructed, for a bit more context imagine:

Project

TOC

## Abstract # Chapter 1 .... # Chapter 2 ....

The documents basically have an introductionary level1 chapter that contains the toc as a part of the introduction.

Btw. I found a hackish workaround, which relies on what maybe would be considered a bug by some. Putting # Project within html comments just after the toc makes it not displayed as text but parsed by the toc plugin. However this might be considered a bug in case it is expected to ignore things that would not be rendered. Also I am not sure if this works for all markdown renderers.

from vim-markdown-toc.

mzlogin avatar mzlogin commented on May 17, 2024

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!

from vim-markdown-toc.

PlasmaHH avatar PlasmaHH commented on May 17, 2024

Indeed it works as expected

from vim-markdown-toc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.