2011-02-26 14:59:28 +08:00
|
|
|
" File: tagbar.vim
|
|
|
|
" Description: Tagbar syntax settings
|
|
|
|
" Author: Jan Larres <jan@majutsushi.net>
|
|
|
|
" Licence: Vim licence
|
|
|
|
" Website: http://majutsushi.github.com/tagbar/
|
2011-04-26 19:31:04 +08:00
|
|
|
" Version: 2.0
|
2011-02-26 14:59:28 +08:00
|
|
|
|
|
|
|
if exists("b:current_syntax")
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2011-03-28 21:16:48 +08:00
|
|
|
if has('multi_byte') && has('unix') && &encoding == 'utf-8' &&
|
|
|
|
\ (empty(&termencoding) || &termencoding == 'utf-8')
|
2011-04-25 21:56:51 +08:00
|
|
|
syntax match TagbarKind '\([▶▼] \)\@<=[^-+: ]\+[^:]\+$'
|
|
|
|
syntax match TagbarScope '\([▶▼][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
2011-03-27 20:29:25 +08:00
|
|
|
|
2011-04-25 21:56:51 +08:00
|
|
|
syntax match TagbarFoldIcon '[▶▼]\([-+# ]\)\@='
|
2011-03-27 20:29:25 +08:00
|
|
|
|
2011-03-28 21:16:48 +08:00
|
|
|
syntax match TagbarAccessPublic '\([▶▼ ]\)\@<=+\([^-+# ]\)\@='
|
|
|
|
syntax match TagbarAccessProtected '\([▶▼ ]\)\@<=#\([^-+# ]\)\@='
|
|
|
|
syntax match TagbarAccessPrivate '\([▶▼ ]\)\@<=-\([^-+# ]\)\@='
|
|
|
|
elseif has('multi_byte') && (has('win32') || has('win64')) && g:tagbar_usearrows
|
2011-04-25 21:56:51 +08:00
|
|
|
syntax match TagbarKind '\([▷◢] \)\@<=[^-+: ]\+[^:]\+$'
|
|
|
|
syntax match TagbarScope '\([▷◢][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
2011-03-28 18:02:29 +08:00
|
|
|
|
2011-04-25 21:56:51 +08:00
|
|
|
syntax match TagbarFoldIcon '[▷◢]\([-+# ]\)\@='
|
2011-03-28 18:02:29 +08:00
|
|
|
|
2011-03-28 21:16:48 +08:00
|
|
|
syntax match TagbarAccessPublic '\([▷◢ ]\)\@<=+\([^-+# ]\)\@='
|
|
|
|
syntax match TagbarAccessProtected '\([▷◢ ]\)\@<=#\([^-+# ]\)\@='
|
|
|
|
syntax match TagbarAccessPrivate '\([▷◢ ]\)\@<=-\([^-+# ]\)\@='
|
2011-03-27 20:29:25 +08:00
|
|
|
else
|
2011-04-25 21:56:51 +08:00
|
|
|
syntax match TagbarKind '\([-+] \)\@<=[^-+: ]\+[^:]\+$'
|
|
|
|
syntax match TagbarScope '\([-+][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
2011-03-26 22:32:31 +08:00
|
|
|
|
2011-04-25 21:56:51 +08:00
|
|
|
syntax match TagbarFoldIcon '[-+]\([-+# ]\)\@='
|
2011-03-27 20:29:25 +08:00
|
|
|
|
|
|
|
syntax match TagbarAccessPublic '\([-+ ]\)\@<=+\([^-+# ]\)\@='
|
|
|
|
syntax match TagbarAccessProtected '\([-+ ]\)\@<=#\([^-+# ]\)\@='
|
|
|
|
syntax match TagbarAccessPrivate '\([-+ ]\)\@<=-\([^-+# ]\)\@='
|
|
|
|
endif
|
|
|
|
|
|
|
|
syntax match TagbarComment '^".*'
|
2011-04-25 22:01:13 +08:00
|
|
|
syntax match TagbarType ' : \zs.*'
|
2011-03-26 22:32:31 +08:00
|
|
|
syntax match TagbarSignature '(.*)'
|
|
|
|
syntax match TagbarPseudoID '\*\ze :'
|
|
|
|
|
|
|
|
highlight default link TagbarComment Comment
|
|
|
|
highlight default link TagbarKind Identifier
|
|
|
|
highlight default link TagbarScope Title
|
2011-04-25 22:01:13 +08:00
|
|
|
highlight default link TagbarType Type
|
2011-03-26 22:32:31 +08:00
|
|
|
highlight default link TagbarSignature SpecialKey
|
|
|
|
highlight default link TagbarPseudoID NonText
|
2011-04-09 18:00:00 +08:00
|
|
|
highlight default link TagbarFoldIcon Statement
|
2011-04-13 23:59:13 +08:00
|
|
|
highlight default link TagbarHighlight Search
|
2011-02-26 14:59:28 +08:00
|
|
|
|
|
|
|
highlight default TagbarAccessPublic guifg=Green ctermfg=Green
|
|
|
|
highlight default TagbarAccessProtected guifg=Blue ctermfg=Blue
|
|
|
|
highlight default TagbarAccessPrivate guifg=Red ctermfg=Red
|
|
|
|
|
|
|
|
let b:current_syntax = "tagbar"
|