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.0.tar.gz (4.5 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.0-py2.py3-none-any.whl (6.6 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

File hashes

Hashes for markdown2ctags-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cc916e4dd49bbca265cd6d06e3707db657cbab2eedce1166806f449a48c22bc2
MD5 dbdd8967c643c572af35946c158a99b3
BLAKE2b-256 897e3000b0b44e5816cfba1212c1de97fd709ce766921059211c10a6426d5a2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for markdown2ctags-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3585817791dfffab617cb907393d1b143e957f02f1bfde39bea269e711d79979
MD5 49b674bcbac722008a4bdd88b837d78c
BLAKE2b-256 5c2b327544de53dbc6d53c57884380870784346d8e793b55df99bc3667693375

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