mirror of
https://github.com/preservim/tagbar.git
synced 2025-02-14 21:42:46 +08:00
Implement proper folding support
This commit is contained in:
parent
151832d234
commit
7182f9640e
|
@ -606,10 +606,6 @@ files.
|
|||
problem in practice anyway. Tags with the same name at any other level are
|
||||
no problem, though.
|
||||
|
||||
- The fold state of the Tagbar window is lost when the window is left.
|
||||
Again, I don't know of any proper way around this that still allows
|
||||
auto-updating -- |winsaveview()| doesn't really help here.
|
||||
|
||||
==============================================================================
|
||||
8. History *tagbar-history*
|
||||
|
||||
|
@ -659,5 +655,7 @@ warranty of any kind, either expressed or implied. In no event will the
|
|||
copyright holder be liable for any damamges resulting from the use of this
|
||||
software.
|
||||
|
||||
The folding technique was inspired by NERDTree by Martin Grenfell.
|
||||
|
||||
==============================================================================
|
||||
vim: tw=78 ts=8 sw=8 sts=8 noet ft=help
|
||||
|
|
1086
plugin/tagbar.vim
1086
plugin/tagbar.vim
File diff suppressed because it is too large
Load Diff
|
@ -9,19 +9,30 @@ if exists("b:current_syntax")
|
|||
finish
|
||||
endif
|
||||
|
||||
syntax match Comment '^" .*' " Comments
|
||||
syntax match Identifier '^ [^: ]\+[^:]\+$' " Non-scoped kinds
|
||||
syntax match Title '[^(* ]\+\ze\*\? :' " Scope names
|
||||
syntax match Type ' : \zs.*' " Scope types
|
||||
syntax match SpecialKey '(.*)' " Signatures
|
||||
syntax match NonText '\*\ze :' " Pseudo-tag identifiers
|
||||
syntax match TagbarComment '^".*'
|
||||
|
||||
syntax match TagbarKind '\([-+][-+ ]\)\@<=[^-+: ]\+[^:]\+$'
|
||||
syntax match TagbarScope '[^-+#(* ]\+\(\*\? :\)\@='
|
||||
syntax match TagbarScopeType ' : \zs.*'
|
||||
syntax match TagbarSignature '(.*)'
|
||||
syntax match TagbarPseudoID '\*\ze :'
|
||||
|
||||
syntax match TagbarFoldIcon '[-+]\([-+# ]\)\@='
|
||||
|
||||
syntax match TagbarAccessPublic '\([-+ ]\)\@<=+\([^-+# ]\)\@='
|
||||
syntax match TagbarAccessProtected '\([-+ ]\)\@<=#\([^-+# ]\)\@='
|
||||
syntax match TagbarAccessPrivate '\([-+ ]\)\@<=-\([^-+# ]\)\@='
|
||||
|
||||
highlight default link TagbarComment Comment
|
||||
highlight default link TagbarKind Identifier
|
||||
highlight default link TagbarScope Title
|
||||
highlight default link TagbarScopeType Type
|
||||
highlight default link TagbarSignature SpecialKey
|
||||
highlight default link TagbarPseudoID NonText
|
||||
highlight default link TagbarFoldIcon FoldColumn
|
||||
|
||||
highlight default TagbarAccessPublic guifg=Green ctermfg=Green
|
||||
highlight default TagbarAccessProtected guifg=Blue ctermfg=Blue
|
||||
highlight default TagbarAccessPrivate guifg=Red ctermfg=Red
|
||||
|
||||
syntax match TagbarAccessPublic '^\s*+\ze[^ ]'
|
||||
syntax match TagbarAccessProtected '^\s*#\ze[^ ]'
|
||||
syntax match TagbarAccessPrivate '^\s*-\ze[^ ]'
|
||||
|
||||
let b:current_syntax = "tagbar"
|
||||
|
|
Loading…
Reference in New Issue
Block a user