• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jszakmeister/markdown2ctags: Generate ctags-compatible tags files for Markdown d ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

jszakmeister/markdown2ctags

开源软件地址(OpenSource Url):

https://github.com/jszakmeister/markdown2ctags

开源编程语言(OpenSource Language):

Python 100.0%

开源软件介绍(OpenSource Introduction):

markdown2ctags

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 --sro=»',
    \ 'kinds' : [
        \ 's:sections',
        \ 'i:images'
    \ ],
    \ 'sro' : '»',
    \ 'kind2scope' : {
        \ 's' : 'section',
    \ },
    \ 'sort': 0,
\ }

Note

The suggested sro used to be |, but this symbol could be used in headings (when talking about logical operators, for example). As a result, I recommend using something like the UTF-8 chevron above and specifying this new sro character on the command line via the --sro option.

However, some folks have had issues with the chevron--TagBar is failing to split on the character correctly and it results in incorrect headings that contain <bb> in TagBar. I'm not sure what the underlying cause is just yet, but if you're suffering from this issue, you may want to fall back to using the | character. You can do this by dropping the --sro=» parameter from ctagsargs and setting 'sro' to '|'.

You'll need to have the TagBar plugin installed for this to work. Also, you may 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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap