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
609 stars 59 forks source link

[Feature Request] Option to add line number on TOC generation, for quick item navigation (ex.: 35g) #66

Open rossijonas opened 4 years ago

rossijonas commented 4 years ago

First of all, thank you for the work invested on this plugin, and for sharing it with us!

The issue

Quickly navigate to a markdown TOC item corresponding section using vim line numbers: 35g

The feature

Provide the hability for the vim-markdown-toc to add the relative item line number before or after each TOC item.

Providing an option like:

let g:vmt_add_line_number_reference = 1

...that would add the line number and deliver something like this:

<!--- vim-markdown-toc GFM -->

line   5     * Introduction
line  35       ** How To Install
line  45       ** Hello World

<!-- /vim-markdown-toc -->

With a feature like that would be super cool quick and easy to navigate within the markdown file with vim native support.

I appreciate your time on considering that!