Skip to content

Commit

Permalink
Support TagBar for snippets files
Browse files Browse the repository at this point in the history
Bundle an exuberant ctags definition for UltiSnips and tell TagBar how
to find it.
  • Loading branch information
lilyball committed Jul 6, 2014
1 parent d1f6f7e commit dee8265
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ctags/UltiSnips.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--langdef=UltiSnips
--langmap=UltiSnips:.snippets
--regex-UltiSnips=/^snippet (.*)/\1/s,snippet/
9 changes: 9 additions & 0 deletions ftplugin/snippets.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ if exists("loaded_matchit") && !exists("b:match_words")
let b:match_ignorecase = 0
let b:match_words = '^snippet\>:^endsnippet\>,^global\>:^endglobal\>,\${:}'
endif

" Add TagBar support
let g:tagbar_type_snippets = {
\ 'ctagstype': 'UltiSnips',
\ 'kinds': [
\ 's:snippets',
\ ],
\ 'deffile': expand('<sfile>:p:h:h') . '/ctags/UltiSnips.cnf',
\ }

0 comments on commit dee8265

Please sign in to comment.