aboutsummaryrefslogtreecommitdiff
path: root/plugins.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2019-10-15 00:39:28 +0800
committerjdhao <jdhao@hotmail.com>2019-10-15 00:39:28 +0800
commitd57ecccd0a793a8fb82bc1ee778d442ab1c3ced7 (patch)
tree5ecb43a5496b914d5fa4ea04e668381e2e0db170 /plugins.vim
parent5f4e5e1bf4d6f7c9c53cabb6661a82b81a795fbd (diff)
Add markdown support for tagbar
Diffstat (limited to 'plugins.vim')
-rw-r--r--plugins.vim23
1 files changed, 22 insertions, 1 deletions
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 <silent> <Space>t :TagbarToggle<CR>
+
+" 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]