From d57ecccd0a793a8fb82bc1ee778d442ab1c3ced7 Mon Sep 17 00:00:00 2001 From: jdhao Date: Tue, 15 Oct 2019 00:39:28 +0800 Subject: Add markdown support for tagbar --- plugins.vim | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'plugins.vim') diff --git a/plugins.vim b/plugins.vim index 6aabec6..cb3712f 100644 --- a/plugins.vim +++ b/plugins.vim @@ -566,6 +566,27 @@ let NERDTreeMinimalUI=0 """"""""""""""""""""""""""" tagbar settings """""""""""""""""""""""""""""""""" " Shortcut to toggle tagbar window nnoremap t :TagbarToggle + +" Add support for markdown files in tagbar. +if has('win32') + let g:md_ctags_bin=fnamemodify(stdpath('config')."\\tools\\markdown2ctags.exe", ":p") +else + let g:md_ctags_bin=fnamemodify(stdpath('config')."/tools/markdown2ctags.py", ":p") +endif +let g:tagbar_type_markdown = { + \ 'ctagstype': 'markdown.pandoc', + \ 'ctagsbin' : g:md_ctags_bin, + \ 'ctagsargs' : '-f - --sort=yes', + \ 'kinds' : [ + \ 's:sections', + \ 'i:images' + \ ], + \ 'sro' : '|', + \ 'kind2scope' : { + \ 's' : 'section', + \ }, + \ 'sort': 0, + \ } "}} "{{ File editting @@ -798,7 +819,7 @@ endif let s:candidate_airlinetheme = ['ayu_mirage', 'base16_flat', \ 'base16_grayscale', 'lucius', 'base16_tomorrow', 'ayu_dark', \ 'base16_adwaita', 'biogoo', 'distinguished', 'jellybeans', - \ 'luna', 'raven', 'seagull', 'term', 'vice', 'zenburn', 'tomorrow'] + \ 'luna', 'raven', 'term', 'vice', 'zenburn', 'tomorrow'] let s:idx = utils#RandInt(0, len(s:candidate_airlinetheme)-1) let s:theme = s:candidate_airlinetheme[s:idx] -- cgit v1.2.3