From bcb042da56d9051457b3045bc822ab0a2a08231d Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Sun, 23 Oct 2016 20:31:35 +1300 Subject: [PATCH] Improve HTML support with Universal Ctags, closes #317 --- autoload/tagbar.vim | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index f1de207..3307b9f 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -421,10 +421,19 @@ function! s:InitTypes() abort " HTML {{{3 let type_html = s:TypeInfo.New() let type_html.ctagstype = 'html' - let type_html.kinds = [ - \ {'short' : 'f', 'long' : 'JavaScript funtions', 'fold' : 0, 'stl' : 1}, - \ {'short' : 'a', 'long' : 'named anchors', 'fold' : 0, 'stl' : 1} - \ ] + if s:ctags_is_uctags + let type_html.kinds = [ + \ {'short' : 'a', 'long' : 'named anchors', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'h', 'long' : 'H1 headings', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'i', 'long' : 'H2 headings', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'j', 'long' : 'H3 headings', 'fold' : 0, 'stl' : 1}, + \ ] + else + let type_html.kinds = [ + \ {'short' : 'f', 'long' : 'JavaScript functions', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'a', 'long' : 'named anchors', 'fold' : 0, 'stl' : 1} + \ ] + endif let s:known_types.html = type_html " Java {{{3 let type_java = s:TypeInfo.New()