Skip to main content

Generates ctags-compatible output for the sections of a Markdown document.

Project description

This application generates ctags-compatible output for the sections of a Markdown document.

The motivation was to have a tool fast enough to use with the TagBar plugin in Vim.

Using with TagBar

To use this tool with TagBar, add the following into your ~/.vimrc:

" Add support for markdown files in tagbar.
let g:tagbar_type_markdown = {
    \ 'ctagstype': 'markdown',
    \ 'ctagsbin' : '/path/to/markdown2ctags.py',
    \ 'ctagsargs' : '-f - --sort=yes',
    \ 'kinds' : [
        \ 's:sections',
        \ 'i:images'
    \ ],
    \ 'sro' : '|',
    \ 'kind2scope' : {
        \ 's' : 'section',
    \ },
    \ 'sort': 0,
\ }

You’ll need to have the TagBar plugin installed for this to work. Also, you make need to call the variable g:tagbar_type_mkd and change ctagstype to 'mkd' if you’re Ben William’s Markdown syntax highlighting script. It sets the file type to mkd whereas Tim Pope’s sets it to markdown.

License

This tool is licensed under a Simplified BSD license. See LICENSE.txt for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown2ctags-0.2.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

markdown2ctags-0.2.1-py2.py3-none-any.whl (6.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file markdown2ctags-0.2.1.tar.gz.

File metadata

File hashes

Hashes for markdown2ctags-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1d60b641ffbe8a0b7abaf27107148c8798baf4a2e3446cb00233ce1b2895d41f
MD5 19a8ad67c268b52d3eced510fd6f2e47
BLAKE2b-256 02391797b9a889452289216d529e3fe460c26790c99b91ee08e1eda40fbe4369

See more details on using hashes here.

File details

Details for the file markdown2ctags-0.2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for markdown2ctags-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 508237dba63311d5b4ac98d083c51ed4b818fee797eba082523de27c69890062
MD5 40c92820d5b5ea99672c0400dedf7845
BLAKE2b-256 48ce97bce1bf256a375149e2b60492d4c67d92643f427f5d8d03e2decbed20d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page