]> git.r.bdr.sh - rbdr/dotfiles/blame_incremental - vim/syntax/tagbar.vim
Remove task Warrior
[rbdr/dotfiles] / vim / syntax / tagbar.vim
... / ...
CommitLineData
1" File: tagbar.vim
2" Description: Tagbar syntax settings
3" Author: Jan Larres <jan@majutsushi.net>
4" Licence: Vim licence
5" Website: http://majutsushi.github.com/tagbar/
6" Version: 2.3
7
8scriptencoding utf-8
9
10if exists("b:current_syntax")
11 finish
12endif
13
14let s:ic = g:tagbar_iconchars[0]
15if s:ic =~ '[]^\\-]'
16 let s:ic = '\' . s:ic
17endif
18let s:io = g:tagbar_iconchars[1]
19if s:io =~ '[]^\\-]'
20 let s:io = '\' . s:io
21endif
22
23let s:pattern = '\([' . s:ic . s:io . '] \)\@<=[^-+: ]\+[^:]\+$'
24execute "syntax match TagbarKind '" . s:pattern . "'"
25
26let s:pattern = '\([' . s:ic . s:io . '][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@='
27execute "syntax match TagbarScope '" . s:pattern . "'"
28
29let s:pattern = '[' . s:ic . s:io . ']\([-+# ]\)\@='
30execute "syntax match TagbarFoldIcon '" . s:pattern . "'"
31
32let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=+\([^-+# ]\)\@='
33execute "syntax match TagbarAccessPublic '" . s:pattern . "'"
34let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=#\([^-+# ]\)\@='
35execute "syntax match TagbarAccessProtected '" . s:pattern . "'"
36let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=-\([^-+# ]\)\@='
37execute "syntax match TagbarAccessPrivate '" . s:pattern . "'"
38
39unlet s:pattern
40
41syntax match TagbarNestedKind '^\s\+\[[^]]\+\]$'
42syntax match TagbarComment '^".*'
43syntax match TagbarType ' : \zs.*'
44syntax match TagbarSignature '(.*)'
45syntax match TagbarPseudoID '\*\ze :'
46
47highlight default link TagbarComment Comment
48highlight default link TagbarKind Identifier
49highlight default link TagbarNestedKind TagbarKind
50highlight default link TagbarScope Title
51highlight default link TagbarType Type
52highlight default link TagbarSignature SpecialKey
53highlight default link TagbarPseudoID NonText
54highlight default link TagbarFoldIcon Statement
55highlight default link TagbarHighlight Search
56
57highlight default TagbarAccessPublic guifg=Green ctermfg=Green
58highlight default TagbarAccessProtected guifg=Blue ctermfg=Blue
59highlight default TagbarAccessPrivate guifg=Red ctermfg=Red
60
61let b:current_syntax = "tagbar"
62
63" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1