vim-markcont

Created: 2014-03-13 03:24
Updated: 2017-09-17 06:25

README.md

Vim MarkCont

a vim plugin to create a table of contents for markdown file based on headers. you can remove and update contents. it uses a script written in python2.

Note: only Atx-style headers are supported.

Usage

:MarkCont       creates contents below the current line.
:MarkRemove     removes contents generated by this plugin.
:MarkUpdate     updates the contents if the file has been changed.
:MarkGoto       shows the content if cursor is on contents table section

you can change title for table of contents with g:markcont-title. you may like to map Enter key to :MarkGoto in markdown filetypes for convenient.

Example

    Title
    =============
    # Header1
    ##Header1a
    # Headr2  #
    # Header3
    # Header number three
    ### header ###

the output table will be like:

  Table of Contents
  -------------
  - [Header1](#header1)
      - [Header1a](#header1a)
  - [Headr2](#headr2)
  - [Header3](#header3)
  - [Header number three](#header-number-three)
        - [header](#hear)
  -------------

inspired by tocdown and doctoc-web

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more