mirror of
https://github.com/gryf/tagbar.git
synced 2026-05-10 16:32:58 +02:00
Compare commits
209 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e872e67641 | |||
| b610fb2f5d | |||
| ace45adc51 | |||
| 88d7464079 | |||
| dbc05b24a3 | |||
| 6d8770f949 | |||
| c4963e91cc | |||
| 87bbb46e95 | |||
| b4a5800f72 | |||
| ba3693f977 | |||
| 528bdc6b8d | |||
| 2dcd5260b6 | |||
| 3f28e3b073 | |||
| 915b11bd1c | |||
| e090fe73d1 | |||
| 574376d165 | |||
| 66c56b11a7 | |||
| c57dd9f7a4 | |||
| f3250b2dd1 | |||
| 0377f19d74 | |||
| 2d650b96cf | |||
| 290b71e2b7 | |||
| 78a7eeecf3 | |||
| 207b8520c2 | |||
| 1a2c4ec958 | |||
| 0fd09344c7 | |||
| abffaba655 | |||
| 15f9ad6e88 | |||
| b60d08c468 | |||
| e5408f740f | |||
| 85c198ba57 | |||
| 2e2ba2eab2 | |||
| fd79a17189 | |||
| ae4bbcdaaf | |||
| 3c37ddcc14 | |||
| 5566cb34d5 | |||
| 97d7b04bdd | |||
| 4801c897f8 | |||
| 24efd12f50 | |||
| fec9b2a1ab | |||
| 56cd34830d | |||
| 0b14e28719 | |||
| 225fcaa3ce | |||
| dab8d99fb8 | |||
| a566f7141f | |||
| 7ef2dd0ef1 | |||
| 84d65042fa | |||
| c37d783d4f | |||
| 7ec151a7a9 | |||
| e97d2c00ad | |||
| 57acb383b6 | |||
| 495e5fcb08 | |||
| 746771801c | |||
| 824767bc48 | |||
| 57ee79bd4c | |||
| a217435f50 | |||
| 2bacadf716 | |||
| e4fda667f9 | |||
| 5732ce9bd6 | |||
| f36e0d3d39 | |||
| dacf4f273e | |||
| 82a932406f | |||
| 2ebd2a1392 | |||
| ca02374f40 | |||
| a93fb868d8 | |||
| 070a75cb04 | |||
| 24915dbe24 | |||
| f5435678fb | |||
| 3ecdb5028d | |||
| d0d307c9bd | |||
| f0f9d66465 | |||
| e6e084e8b0 | |||
| cde257b1bc | |||
| 54b28e4988 | |||
| 7c0d8675b5 | |||
| acca348959 | |||
| 1c605bd958 | |||
| 2665695f57 | |||
| 32b5b15b52 | |||
| 87d293206b | |||
| 93f2b68166 | |||
| db9404ca1a | |||
| b6f47e4020 | |||
| ec0eb883dc | |||
| d0df97040b | |||
| dec1f840fb | |||
| 11f8479593 | |||
| 77a318b10e | |||
| c1c7d962af | |||
| aa190a87fa | |||
| 80dfccf09d | |||
| be00efa703 | |||
| cc222f5d8c | |||
| 852c6dac69 | |||
| 0bce914578 | |||
| 59bb2a4355 | |||
| 4ca7a0c636 | |||
| f801147c2e | |||
| 9ec7d1db4c | |||
| 9bbd0098c5 | |||
| 5816ce0c5a | |||
| 3f03aa3013 | |||
| 0224d32eb9 | |||
| 987569e7dd | |||
| a444c62066 | |||
| 1181325968 | |||
| 1f0c0a3a8e | |||
| ad8783961d | |||
| bccdc7a48d | |||
| 2b1f655063 | |||
| 17d199f584 | |||
| feebffcd2a | |||
| 7d836e0c53 | |||
| 0ab07ac566 | |||
| 576d6e6dea | |||
| df341841ec | |||
| 15eddce14f | |||
| e88b81c4f5 | |||
| 19695b87b0 | |||
| 568ef5fd25 | |||
| e635a23cf5 | |||
| 2fee7677d5 | |||
| cd0e20f93b | |||
| ee700817d5 | |||
| 67dc2a3b06 | |||
| 63e689b647 | |||
| ba6eb10e49 | |||
| d39a767486 | |||
| a34acf4f63 | |||
| 6483a0edd1 | |||
| 757358349e | |||
| 04e40e09c1 | |||
| ba7d6b3e8e | |||
| 4569779601 | |||
| 7d1ba97603 | |||
| b1c7f5f792 | |||
| b19c1d8524 | |||
| 8b5ba2ad66 | |||
| 25f43b9e88 | |||
| f6acd740d7 | |||
| bff765b957 | |||
| f2c072dbb9 | |||
| e321d85548 | |||
| f3c1a93017 | |||
| e690a5e97d | |||
| 052bc7972b | |||
| f1c6d8c780 | |||
| 1757b33da7 | |||
| 427d709f61 | |||
| 49d39cae6c | |||
| 6a7f155874 | |||
| 768cd6b908 | |||
| 4981cf9896 | |||
| fd9ac426e9 | |||
| 4dabb96014 | |||
| 7f95420284 | |||
| 44ce05fb5d | |||
| 9ae2b2d818 | |||
| 2e0d125b79 | |||
| 5ee3143b5a | |||
| c4b1d65c46 | |||
| a2652b26a0 | |||
| c5f91a5b76 | |||
| ee1c4e137e | |||
| 272e2e8478 | |||
| 814bb41ecf | |||
| f14c81770b | |||
| bbe5579c89 | |||
| eab0e67d1b | |||
| 497575a3a3 | |||
| 3a049c0f82 | |||
| d29690005d | |||
| 540472bcd3 | |||
| f6a02c9e24 | |||
| f7d966c596 | |||
| 86b49e6949 | |||
| 774c964f28 | |||
| dd84a57c6e | |||
| a9209b4367 | |||
| 134207bc41 | |||
| c0ed890b60 | |||
| c18599234e | |||
| d9857cf204 | |||
| 091f6336c8 | |||
| 3e8e8775be | |||
| 592dc6856a | |||
| 4eb89e4a53 | |||
| efca11881d | |||
| 64b8bf7447 | |||
| 42ef608aae | |||
| 2ba944b162 | |||
| 08b474b59f | |||
| a69cb8ce0b | |||
| 4bf1d7024d | |||
| ee389534e1 | |||
| 7e58b3fe23 | |||
| 6eb2d65f41 | |||
| 4d925ca324 | |||
| b56f2c0db2 | |||
| 2149951be0 | |||
| 0f3cca5a84 | |||
| ba0123cc91 | |||
| 392de7da25 | |||
| cca0f7798e | |||
| 8bb4a3c111 | |||
| 52fe2b7c3a | |||
| 6a95bfbbc0 | |||
| 2c2b3fb99e | |||
| d48c6f83f5 |
@@ -1,7 +0,0 @@
|
||||
Tagbar is a vim plugin for browsing the tags of source code files. It provides
|
||||
a sidebar that displays the ctags-generated tags of the current file, ordered
|
||||
by their scope. This means that for example methods in C++ are displayed under
|
||||
the class they are defined in.
|
||||
|
||||
Check out the homepage at http://majutsushi.github.com/tagbar/ for more
|
||||
information.
|
||||
@@ -0,0 +1,19 @@
|
||||
# Overview
|
||||
|
||||
Tagbar is a vim plugin for browsing the tags of source code files.
|
||||
It provides a sidebar that displays the ctags-generated tags of the current file, ordered by their scope. This means that for example methods in C++ are displayed under the class they are defined in.
|
||||
|
||||
Check out the homepage at http://majutsushi.github.io/tagbar/ for more information.
|
||||
|
||||
# Support for additional filetypes
|
||||
|
||||
For filetypes that are not supported by Exuberant Ctags check out [the wiki](https://github.com/majutsushi/tagbar/wiki) to see whether other projects offer support for them and how to use them. Please add any other projects/configurations that you find or create yourself so that others can benefit from them, too.
|
||||
|
||||
# Important: If the file structure is displayed wrong
|
||||
|
||||
If you notice that there are some errors in the way your file's structure is displayed in Tagbar, please make sure that the bug is actually in Tagbar before you report a bug. Since Tagbar uses [exuberant-ctags](http://ctags.sourceforge.net/) and compatible programs to do the actual file parsing, it is likely that the bug is actually in one of those programs instead.
|
||||
|
||||
There is an example in `:h tagbar-issues` about how to run ctags manually so you can determine where the bug actually is. If the bug is actually in ctags, please report it on their website instead, as there is nothing I can do about it in Tagbar. Thank you!
|
||||
|
||||
You can also have a look at ctags bugs that have previously been filed on Tagbar here:
|
||||
https://github.com/majutsushi/tagbar/issues?labels=ctags-bug&page=1&state=closed
|
||||
+1998
-1045
File diff suppressed because it is too large
Load Diff
+674
-263
File diff suppressed because it is too large
Load Diff
+59
-47
@@ -4,7 +4,7 @@
|
||||
" Author: Jan Larres <jan@majutsushi.net>
|
||||
" Licence: Vim licence
|
||||
" Website: http://majutsushi.github.com/tagbar/
|
||||
" Version: 2.3
|
||||
" Version: 2.6.1
|
||||
" Note: This plugin was heavily inspired by the 'Taglist' plugin by
|
||||
" Yegappan Lakshmanan and uses a small amount of code from it.
|
||||
"
|
||||
@@ -42,41 +42,35 @@ if v:version == 700 && !has('patch167')
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_left')
|
||||
let g:tagbar_left = 0
|
||||
endif
|
||||
function! s:init_var(var, value) abort
|
||||
if !exists('g:tagbar_' . a:var)
|
||||
execute 'let g:tagbar_' . a:var . ' = ' . string(a:value)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
if !exists('g:tagbar_width')
|
||||
let g:tagbar_width = 40
|
||||
endif
|
||||
let s:options = [
|
||||
\ ['autoclose', 0],
|
||||
\ ['autofocus', 0],
|
||||
\ ['autopreview', 0],
|
||||
\ ['autoshowtag', 0],
|
||||
\ ['compact', 0],
|
||||
\ ['expand', 0],
|
||||
\ ['foldlevel', 99],
|
||||
\ ['indent', 2],
|
||||
\ ['left', 0],
|
||||
\ ['previewwin_pos', 'topleft'],
|
||||
\ ['show_visibility', 1],
|
||||
\ ['show_linenumbers', 0],
|
||||
\ ['singleclick', 0],
|
||||
\ ['sort', 1],
|
||||
\ ['systemenc', &encoding],
|
||||
\ ['width', 40],
|
||||
\ ]
|
||||
|
||||
if !exists('g:tagbar_autoclose')
|
||||
let g:tagbar_autoclose = 0
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_autofocus')
|
||||
let g:tagbar_autofocus = 0
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_sort')
|
||||
let g:tagbar_sort = 1
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_compact')
|
||||
let g:tagbar_compact = 0
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_expand')
|
||||
let g:tagbar_expand = 0
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_singleclick')
|
||||
let g:tagbar_singleclick = 0
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_foldlevel')
|
||||
let g:tagbar_foldlevel = 99
|
||||
endif
|
||||
for [opt, val] in s:options
|
||||
call s:init_var(opt, val)
|
||||
endfor
|
||||
unlet s:options
|
||||
|
||||
if !exists('g:tagbar_iconchars')
|
||||
if has('multi_byte') && has('unix') && &encoding == 'utf-8' &&
|
||||
@@ -87,17 +81,31 @@ if !exists('g:tagbar_iconchars')
|
||||
endif
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_autoshowtag')
|
||||
let g:tagbar_autoshowtag = 0
|
||||
endif
|
||||
let s:keymaps = [
|
||||
\ ['jump', '<CR>'],
|
||||
\ ['preview', 'p'],
|
||||
\ ['previewwin', 'P'],
|
||||
\ ['nexttag', '<C-N>'],
|
||||
\ ['prevtag', '<C-P>'],
|
||||
\ ['showproto', '<Space>'],
|
||||
\
|
||||
\ ['openfold', ['+', '<kPlus>', 'zo']],
|
||||
\ ['closefold', ['-', '<kMinus>', 'zc']],
|
||||
\ ['togglefold', ['o', 'za']],
|
||||
\ ['openallfolds', ['*', '<kMultiply>', 'zR']],
|
||||
\ ['closeallfolds', ['=', 'zM']],
|
||||
\
|
||||
\ ['togglesort', 's'],
|
||||
\ ['zoomwin', 'x'],
|
||||
\ ['close', 'q'],
|
||||
\ ['help', '<F1>'],
|
||||
\ ]
|
||||
|
||||
if !exists('g:tagbar_updateonsave_maxlines')
|
||||
let g:tagbar_updateonsave_maxlines = 5000
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_systemenc')
|
||||
let g:tagbar_systemenc = &encoding
|
||||
endif
|
||||
for [map, key] in s:keymaps
|
||||
call s:init_var('map_' . map, key)
|
||||
unlet key
|
||||
endfor
|
||||
unlet s:keymaps
|
||||
|
||||
augroup TagbarSession
|
||||
autocmd!
|
||||
@@ -105,14 +113,18 @@ augroup TagbarSession
|
||||
augroup END
|
||||
|
||||
" Commands {{{1
|
||||
command! -nargs=0 Tagbar call tagbar#ToggleWindow()
|
||||
command! -nargs=0 TagbarToggle call tagbar#ToggleWindow()
|
||||
command! -nargs=? TagbarOpen call tagbar#OpenWindow(<f-args>)
|
||||
command! -nargs=0 TagbarOpenAutoClose call tagbar#OpenWindow('fc')
|
||||
command! -nargs=0 TagbarOpenAutoClose call tagbar#OpenWindow('fcj')
|
||||
command! -nargs=0 TagbarClose call tagbar#CloseWindow()
|
||||
command! -nargs=1 TagbarSetFoldlevel call tagbar#SetFoldLevel(<args>)
|
||||
command! -nargs=0 TagbarShowTag call tagbar#OpenParents()
|
||||
command! -nargs=1 -bang TagbarSetFoldlevel call tagbar#SetFoldLevel(<args>, <bang>0)
|
||||
command! -nargs=0 TagbarShowTag call tagbar#highlighttag(1, 1)
|
||||
command! -nargs=? TagbarCurrentTag echo tagbar#currenttag('%s', 'No current tag', <f-args>)
|
||||
command! -nargs=1 TagbarGetTypeConfig call tagbar#gettypeconfig(<f-args>)
|
||||
command! -nargs=? TagbarDebug call tagbar#StartDebug(<f-args>)
|
||||
command! -nargs=0 TagbarDebugEnd call tagbar#StopDebug()
|
||||
command! -nargs=0 TagbarTogglePause call tagbar#toggle_pause()
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
|
||||
+22
-22
@@ -3,48 +3,45 @@
|
||||
" Author: Jan Larres <jan@majutsushi.net>
|
||||
" Licence: Vim licence
|
||||
" Website: http://majutsushi.github.com/tagbar/
|
||||
" Version: 2.3
|
||||
" Version: 2.6.1
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:ic = g:tagbar_iconchars[0]
|
||||
if s:ic =~ '[]^\\-]'
|
||||
let s:ic = '\' . s:ic
|
||||
endif
|
||||
let s:io = g:tagbar_iconchars[1]
|
||||
if s:io =~ '[]^\\-]'
|
||||
let s:io = '\' . s:io
|
||||
endif
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . '] \)\@<=[^-+: ]\+[^:]\+$'
|
||||
let s:ics = escape(join(g:tagbar_iconchars, ''), ']^\-')
|
||||
let s:pattern = '\(^[' . s:ics . '] \?\)\@<=[^-+: ]\+[^:]\+$'
|
||||
execute "syntax match TagbarKind '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . '][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
||||
let s:pattern = '\(\S\@<![' . s:ics . '][-+# ]\?\)\@<=[^*(]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
||||
execute "syntax match TagbarScope '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '[' . s:ic . s:io . ']\([-+# ]\)\@='
|
||||
let s:pattern = '\S\@<![' . s:ics . ']\([-+# ]\?\)\@='
|
||||
execute "syntax match TagbarFoldIcon '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=+\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessPublic '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=#\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessProtected '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=-\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessPrivate '" . s:pattern . "'"
|
||||
let s:pattern = '\(\S\@<![' . s:ics . ' ]\)\@<=+\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarVisibilityPublic '" . s:pattern . "'"
|
||||
let s:pattern = '\(\S\@<![' . s:ics . ' ]\)\@<=#\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarVisibilityProtected '" . s:pattern . "'"
|
||||
let s:pattern = '\(\S\@<![' . s:ics . ' ]\)\@<=-\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarVisibilityPrivate '" . s:pattern . "'"
|
||||
|
||||
unlet s:pattern
|
||||
|
||||
syntax match TagbarHelp '^".*' contains=TagbarHelpKey,TagbarHelpTitle
|
||||
syntax match TagbarHelpKey '" \zs.*\ze:' contained
|
||||
syntax match TagbarHelpTitle '" \zs-\+ \w\+ -\+' contained
|
||||
|
||||
syntax match TagbarNestedKind '^\s\+\[[^]]\+\]$'
|
||||
syntax match TagbarComment '^".*'
|
||||
syntax match TagbarType ' : \zs.*'
|
||||
syntax match TagbarSignature '(.*)'
|
||||
syntax match TagbarPseudoID '\*\ze :'
|
||||
|
||||
highlight default link TagbarComment Comment
|
||||
highlight default link TagbarHelp Comment
|
||||
highlight default link TagbarHelpKey Identifier
|
||||
highlight default link TagbarHelpTitle PreProc
|
||||
highlight default link TagbarKind Identifier
|
||||
highlight default link TagbarNestedKind TagbarKind
|
||||
highlight default link TagbarScope Title
|
||||
@@ -57,6 +54,9 @@ highlight default link TagbarHighlight Search
|
||||
highlight default TagbarAccessPublic guifg=Green ctermfg=Green
|
||||
highlight default TagbarAccessProtected guifg=Blue ctermfg=Blue
|
||||
highlight default TagbarAccessPrivate guifg=Red ctermfg=Red
|
||||
highlight default link TagbarVisibilityPublic TagbarAccessPublic
|
||||
highlight default link TagbarVisibilityProtected TagbarAccessProtected
|
||||
highlight default link TagbarVisibilityPrivate TagbarAccessPrivate
|
||||
|
||||
let b:current_syntax = "tagbar"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user