1
0
mirror of https://github.com/gryf/tagbar.git synced 2026-05-10 16:32:58 +02:00

124 Commits

Author SHA1 Message Date
Jan Larres dec1f840fb Version 2.5 2013-03-25 22:27:12 +13:00
Jan Larres 11f8479593 Return to the correct window after closing Tagbar, closes #132
Since the window numbers can change when opening and closing windows
Tagbar so far has used bufwinnr() to find the right window to jump back
to. However, this fails if the same file is being displayed in more than
one window. Save a window-local variable instead to detect the correct
window to jump back to.
2013-03-24 14:16:56 +13:00
Jan Larres 77a318b10e Don't disrupt the statusline if ctags fails 2013-03-23 19:46:38 +13:00
Jan Larres c1c7d962af Explain ctags bug issues in README.md 2013-03-21 16:30:38 +13:00
Jan Larres aa190a87fa Rename README to README.md 2013-03-21 16:12:08 +13:00
Jan Larres 80dfccf09d Don't restore window position if moved manually 2013-03-18 19:09:12 +13:00
Jan Larres be00efa703 Save and restore window position when expanding, closes #129 2013-03-18 18:51:54 +13:00
Jan Larres cc222f5d8c Run ctags even if previous run produced erros, closes #125
If a ctags-compatible program returns an error status code on a parsing
failure then it would never be run again on the same file, even if later
invocations would have returned normally (for example after fixing an
error in the current file). Therefore we need to execute the program on
updates as usual, but do not repeat error messages if the previous run
already did.
2013-02-26 21:56:12 +13:00
Jan Larres 852c6dac69 Better handling of switching to unsupported buffer 2013-02-19 00:02:32 +13:00
Jan Larres 0bce914578 Update credits 2013-02-18 21:56:32 +13:00
Jan Larres 59bb2a4355 Merge pull request #123 from jszakmeister/fix-currenttag-on-unsupported-file
When switching to a buffer that is unsupported, clear current.
2013-02-18 00:51:36 -08:00
Jan Larres 4ca7a0c636 Prevent update error when current file is empty 2013-02-18 21:51:16 +13:00
Jan Larres f801147c2e Fix header indentation 2013-02-13 23:34:17 +13:00
Jan Larres 9ec7d1db4c Merge pull request #118 from techlivezheng/feature/autoupdate-on-bufreadpost
Run auto-updating on BufReadPost event
2013-02-06 00:35:57 -08:00
Jan Larres 9bbd0098c5 Don't update when in previewwindow, closes #112 2013-02-06 21:21:18 +13:00
Jan Larres 5816ce0c5a Add abort() to NextNormalWindow function 2013-02-06 19:00:34 +13:00
Jan Larres 3f03aa3013 Small patch cleanup 2013-02-06 18:43:51 +13:00
Techlive Zheng 0224d32eb9 Only reset '0 mark when it is the last window
We only need to reset '0 mark when our tagbar window is the last one,
otherwise, just quit the window and let the other window handle the
error that might happen on quiting Vim.
2013-02-06 18:21:36 +13:00
Techlive Zheng 987569e7dd Only colse the tagbar window itself
If there are other plugin windows open, close tagbar window and handle
over the control to the other window.

If the last file in the Vim's file arguments list has not been edited
yet, normal Vim's behavior would be quit on ':q!' or twice ':q'. As our
plugin window is the last window now, previously quiting on the file
window will not trigger the "more files" check, but our window does.
We'd better to behave the same. Currently, twice ':q' quiting would work,
but ':q!' not. There is no easy way to determine whether the command
being executed with a "!" or not, so this is a flaw now and we need
to come up a better solution someday, but it is a progress than before.
2013-02-06 18:21:35 +13:00
Techlive Zheng a444c62066 Quit if no more normal window exists
There might be other plugin windows but no normal file window open, we
need to make sure tagbar window is closed at this situation.
2013-02-06 18:21:35 +13:00
Jan Larres 1181325968 Reinstate noautocmd when going to pprev window 2013-02-06 17:30:33 +13:00
Jan Larres 1f0c0a3a8e Small cleanup of last patch 2013-02-06 17:07:27 +13:00
Techlive Zheng ad8783961d Do not interfere window switching history
Many plugins rely on 'wincmd p' to work properly, we need to preserve
at least one-level backwards window switching history.
2013-02-06 17:00:09 +13:00
Jan Larres bccdc7a48d Improve out-of-sync error reporting 2013-02-04 15:10:06 +13:00
John Szakmeister 2b1f655063 When switching to a buffer that is unsupported, clear current. 2013-01-20 10:54:16 -05:00
Techlive Zheng 17d199f584 Run auto-updating on BufReadPost event
If 'autoread' is set and a buffer gets updated, tagbar need to be
triggerd to update itself too.
2012-11-30 08:17:58 +08:00
Jan Larres feebffcd2a Always colour signature correctly 2012-11-22 18:43:46 +13:00
Jan Larres 7d836e0c53 Make visibility symbols optional 2012-11-22 18:42:14 +13:00
Jan Larres 0ab07ac566 Use 'visibility' instead of 'access' everywhere exclusively 2012-11-22 18:05:59 +13:00
Jan Larres 576d6e6dea Update credits 2012-11-21 20:44:43 +13:00
Jan Larres df341841ec Small doc fix 2012-11-21 18:44:28 +13:00
kianryan 15eddce14f Updates to TagbarTogglePause
Changes requested by majutsushi.

Changed function to :TagbarTogglePause
Added documentation for function, including usage and defintion.
Changed autocommands_enable to autocommands_enabled.
2012-11-01 14:36:45 +00:00
kianryan e88b81c4f5 Merge branch 'master' of github.com:kianryan/tagbar 2012-10-01 14:24:46 +01:00
kianryan 19695b87b0 Pause autocmd functionality with :TagbarPause
tagbar#PauseAutocommands :TagbarPause

:TagbarPause pauses autocmds, effectively freezing Tagbar on the last
file.  Useful for keeping a tag reference for a file open whilst working
in a different file.
2012-10-01 14:22:35 +01:00
Jan Larres 568ef5fd25 Make the indent configurable, closes #110 2012-10-01 22:59:53 +13:00
Jan Larres e635a23cf5 Don't disable cursorline/column locally 2012-10-01 21:57:28 +13:00
Jan Larres 2fee7677d5 Handle invalid fields gracefully 2012-09-16 03:03:11 +12:00
Jan Larres cd0e20f93b Add TagbarCurrentTag command, closes #109 2012-09-15 17:03:43 +12:00
Jan Larres ee700817d5 Fix some TagbarShowTag bugs, closes #108 2012-09-15 16:49:28 +12:00
Jan Larres 67dc2a3b06 Typo 2012-09-13 23:29:39 +12:00
Jan Larres 63e689b647 Escape all cmd.exe reserved chars 2012-09-11 17:44:14 +12:00
Jan Larres ba6eb10e49 Don't use doautocmd 2012-09-09 22:55:57 +12:00
Jan Larres d39a767486 Allow prototype to be shown with currenttag 2012-09-09 20:17:44 +12:00
Jan Larres a34acf4f63 Merge pull request #106 from sethwoodworth/master
Remove space from statusline example
2012-09-04 06:13:57 -07:00
Jan Larres 6483a0edd1 Merge pull request #104 from zmx/patch-1
Support Clojure as LISP type
2012-09-04 05:48:31 -07:00
Jan Larres 757358349e Move some var inits outside of win init function 2012-09-05 00:29:28 +12:00
Seth Woodworth 04e40e09c1 fix example for statusline
vim funcs can't have spaces in arg lists
2012-09-03 19:07:52 -03:00
Zhong, Ming-Xun ba7d6b3e8e Support Clojure as LISP type 2012-08-31 18:42:25 +08:00
Jan Larres 4569779601 Only generate prototypes on-demand 2012-08-27 01:57:56 +12:00
Jan Larres 7d1ba97603 Typo in comment 2012-08-26 19:32:46 +12:00
Jan Larres b1c7f5f792 Improve prototype handling 2012-08-26 19:25:02 +12:00
Jan Larres b19c1d8524 Try to get complete prototype 2012-08-26 18:36:26 +12:00
Jan Larres 8b5ba2ad66 Tweak some debug messages 2012-08-23 01:47:59 +12:00
Jan Larres 25f43b9e88 Print debug message when executing ctags 2012-08-23 00:59:41 +12:00
Jan Larres f6acd740d7 Better debug message 2012-08-18 00:11:07 +12:00
Jan Larres bff765b957 Only determine extension once 2012-08-01 21:08:49 +12:00
Jan Larres f2c072dbb9 Add extension to temporary files 2012-07-31 16:50:55 +12:00
Jan Larres e321d85548 Don't open all folds when jumping to tag 2012-07-31 16:42:33 +12:00
Jan Larres f3c1a93017 Make 'open' commands a bit more intuitive 2012-07-31 16:42:18 +12:00
Jan Larres e690a5e97d Cache files locally for parsing
Files are now cached locally in a temporary file, and the parsing
happens on that file. This allows displaying tags for remote (Netrw)
files, and it will also make access to files on remote filesystems like
NFS and sshfs faster.

Additionally, tags are now always updated when the files are saved,
deprecating the tagbar_updateonsave_maxlines option. Otherwise checking
for changes in remote files would not have been possible.
2012-07-22 21:49:17 +12:00
Jan Larres 052bc7972b Correct latest stable ctags version for latex support 2012-07-22 18:14:14 +12:00
Jan Larres f1c6d8c780 Clarify LaTeX support in manual 2012-07-21 23:51:01 +12:00
Jan Larres 1757b33da7 Explain feature requirements in systemenc doc 2012-07-21 21:08:33 +12:00
Jan Larres 427d709f61 Only attempt encoding conversion if compiled with +multi_byte 2012-07-21 20:59:23 +12:00
Jan Larres 49d39cae6c Add 'abort' keyword to all functions 2012-07-20 01:24:16 +12:00
Jan Larres 6a7f155874 Version 2.4.1 2012-07-16 21:38:20 +12:00
Jan Larres 768cd6b908 Only check for ctags when a function is called
If ctags isn't installed, then until now most of the autoload script
would have been skipped, leaving functions like tagbar#currenttag()
undefined. Move the ctags check to the exuberant-ctags checking function
to prevent errors in this case.
2012-07-01 19:21:44 +12:00
Jan Larres 4981cf9896 Handle missing ctags more gracefully in currenttag
If tagbar#currenttag() was used in a statusline on a system that had
Tagbar installed, but not ctags, then an error was reported on every
statusline update. Change the ctags checking so that errors in
currenttag() fail silently while still reporting an error message if
Tagbar is opened normally.
2012-07-01 18:48:00 +12:00
Jan Larres fd9ac426e9 Clarification for custom tags programs 2012-06-29 02:08:01 +12:00
Jan Larres 4dabb96014 Update types for vim, sql and actionscript
Some of the type configurations were not up to date with the latest
ctags version. Thanks to David Fishburn for providing the information.
2012-06-24 18:57:50 +12:00
Jan Larres 7f95420284 Disable spellchecking in Tagbar window, closes #83 2012-06-23 16:39:07 +12:00
Jan Larres 44ce05fb5d Fix highlighting tags in closed folds
If a tag was in a closed fold that was itself in a closed fold, and
those folds existed since the initial display (for example by using the
g:tagbar_foldlevel option), then intermediate tags could have invalid
tline values which resulted in the search pattern failing.
2012-06-23 01:30:45 +12:00
Jan Larres 9ae2b2d818 Add highlight pattern debug message 2012-06-22 22:25:03 +12:00
Jan Larres 2e0d125b79 Explicitly load plugin file if necessary 2012-06-19 16:49:55 +12:00
Jan Larres 5ee3143b5a Version 2.4 2012-06-17 21:19:42 +12:00
Jan Larres c4b1d65c46 Explain highlighting update time 2012-06-16 22:01:55 +12:00
Jan Larres a2652b26a0 Add missing command help tags 2012-06-16 21:52:51 +12:00
Jan Larres c5f91a5b76 Add command for easy type customization 2012-06-16 21:46:54 +12:00
Jan Larres ee1c4e137e Always highlight current tag when using TagbarOpen, closes #73 2012-05-12 20:07:04 +12:00
Jan Larres 272e2e8478 Escape some special characters for cmd.exe 2012-04-30 16:40:28 +12:00
Jan Larres 814bb41ecf Highlight correct tag when opening tagbar 2012-04-22 04:28:28 +12:00
Jan Larres f14c81770b Fix small bug in RestoreSession 2012-04-15 23:10:58 +12:00
Jan Larres bbe5579c89 Allow the full hierarchy to be displayed in currenttag() 2012-04-15 23:10:34 +12:00
Jan Larres eab0e67d1b Make use of improved latex support in ctags if available 2012-04-02 18:30:18 +12:00
Jan Larres 497575a3a3 Highlight all tags instead of just stl-configured ones 2012-03-31 20:25:05 +13:00
Jan Larres 3a049c0f82 Mention that a pattern should be used in tag format 2012-03-16 23:56:26 +13:00
Jan Larres d29690005d Move default column definition into tag init function 2012-03-16 23:51:35 +13:00
Jan Larres 540472bcd3 Describe tag file format supported 2012-03-16 23:49:49 +13:00
Jan Larres f6a02c9e24 Use spaces instead of tabs in help file 2012-03-16 02:33:27 +13:00
Jan Larres f7d966c596 Support column: extension field 2012-03-14 23:10:31 +13:00
Jan Larres 86b49e6949 Make SetFoldlevel respect default-closed folds without '!', closes #61 2012-03-14 22:42:59 +13:00
Jan Larres 774c964f28 Use prototypes for the type information 2012-03-14 22:42:59 +13:00
Jan Larres dd84a57c6e Move parsing of user type defs into separate function 2012-03-08 18:06:51 +13:00
Jan Larres a9209b4367 Remove access info from currenttag() 2012-03-05 23:31:11 +13:00
Jan Larres 134207bc41 Allow types for tagbar#currenttag() to be configured 2012-03-04 20:52:15 +13:00
Jan Larres c0ed890b60 Disable debug mode by default, closes #67 2012-02-29 02:35:47 +13:00
Jan Larres c18599234e Align help tags better 2012-02-29 00:33:27 +13:00
Jan Larres d9857cf204 Add function that returns the current tag, closes #59 2012-02-29 00:21:50 +13:00
Jan Larres 091f6336c8 Save some unnecessary redrawings 2012-02-28 22:46:04 +13:00
Jan Larres 3e8e8775be Create sub-kind headers as base tags to allow folding of parents 2012-02-28 22:45:11 +13:00
Jan Larres 592dc6856a Update online help 2012-02-28 22:10:41 +13:00
Jan Larres 4eb89e4a53 Don't handle sub-kind headers as tags 2012-02-28 22:10:16 +13:00
Jan Larres efca11881d Remove unneeded function 2012-02-28 02:38:39 +13:00
Jan Larres 64b8bf7447 Reorder some functions 2012-02-28 02:34:01 +13:00
Jan Larres 42ef608aae Mention the Taglist behaviour in autoopen options 2012-02-27 23:19:50 +13:00
Jan Larres 2ba944b162 Correct focus on startup under certain circumstances, closes #60 2012-02-23 20:49:16 +13:00
Jan Larres 08b474b59f Add some more debugging messages 2012-02-23 20:43:13 +13:00
Jan Larres a69cb8ce0b Delete fileinfo also on BufUnload and BufWipeout 2012-02-23 00:00:24 +13:00
Jan Larres 4bf1d7024d Mention user types in ftplugins in documentation 2012-02-19 17:57:00 +13:00
Jan Larres ee389534e1 Allow loading type definitions from ftplugins, closes #62 2012-02-19 17:26:15 +13:00
Jan Larres 7e58b3fe23 Change kind header check in JumpToTag to proper function 2012-02-18 21:47:40 +13:00
Jan Larres 6eb2d65f41 Some clarifications in the documentation 2012-02-16 22:01:21 +13:00
Jan Larres 4d925ca324 Automatically detect ex-ctags as 'ectags' in OpenBSD 2012-02-12 19:21:37 +13:00
Jan Larres b56f2c0db2 Support Vala if anjuta-tags is available 2012-02-12 18:37:05 +13:00
Jan Larres 2149951be0 Check filetypes supported by ctags during init 2012-02-12 18:36:45 +13:00
Jan Larres 0f3cca5a84 Give more precise information if specified ctags not found 2012-02-12 18:35:54 +13:00
Jan Larres ba0123cc91 Fix bug when closing window before a valid files was seen 2012-02-02 21:07:13 +13:00
Jan Larres 392de7da25 Save new empty object for file if ctags output is empty, closes #57 2012-02-01 00:21:28 +13:00
Jan Larres cca0f7798e Add some debug messages 2012-01-31 20:59:06 +13:00
Jan Larres 8bb4a3c111 Abstract out window commands without autocommands 2012-01-31 20:58:49 +13:00
Jan Larres 52fe2b7c3a Try to jump to the correct window after closing, closes #56 2012-01-20 15:56:50 +13:00
Jan Larres 6a95bfbbc0 Only ignore BufEnter when jumping to tag 2012-01-18 18:38:34 +13:00
Jan Larres 2c2b3fb99e Use quitall in QuitIfOnlyWindow() 2012-01-14 19:35:50 +13:00
Jan Larres d48c6f83f5 Add 'always' parameter to autoopen() 2012-01-14 19:35:01 +13:00
6 changed files with 2028 additions and 1180 deletions
-7
View File
@@ -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.
+16
View File
@@ -0,0 +1,16 @@
# 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.com/tagbar/ for more information.
# 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
+1515 -905
View File
File diff suppressed because it is too large Load Diff
+472 -253
View File
File diff suppressed because it is too large Load Diff
+15 -8
View File
@@ -4,7 +4,7 @@
" Author: Jan Larres <jan@majutsushi.net>
" Licence: Vim licence
" Website: http://majutsushi.github.com/tagbar/
" Version: 2.3
" Version: 2.5
" Note: This plugin was heavily inspired by the 'Taglist' plugin by
" Yegappan Lakshmanan and uses a small amount of code from it.
"
@@ -66,6 +66,14 @@ if !exists('g:tagbar_compact')
let g:tagbar_compact = 0
endif
if !exists('g:tagbar_indent')
let g:tagbar_indent = 2
endif
if !exists('g:tagbar_show_visibility')
let g:tagbar_show_visibility = 1
endif
if !exists('g:tagbar_expand')
let g:tagbar_expand = 0
endif
@@ -91,10 +99,6 @@ if !exists('g:tagbar_autoshowtag')
let g:tagbar_autoshowtag = 0
endif
if !exists('g:tagbar_updateonsave_maxlines')
let g:tagbar_updateonsave_maxlines = 5000
endif
if !exists('g:tagbar_systemenc')
let g:tagbar_systemenc = &encoding
endif
@@ -107,12 +111,15 @@ augroup END
" Commands {{{1
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#PauseAutocommands()
" Modeline {{{1
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
+10 -7
View File
@@ -3,7 +3,7 @@
" Author: Jan Larres <jan@majutsushi.net>
" Licence: Vim licence
" Website: http://majutsushi.github.com/tagbar/
" Version: 2.3
" Version: 2.5
scriptencoding utf-8
@@ -20,21 +20,21 @@ if s:io =~ '[]^\\-]'
let s:io = '\' . s:io
endif
let s:pattern = '\([' . s:ic . s:io . '] \)\@<=[^-+: ]\+[^:]\+$'
let s:pattern = '\([' . s:ic . s:io . '] \?\)\@<=[^-+: ]\+[^:]\+$'
execute "syntax match TagbarKind '" . s:pattern . "'"
let s:pattern = '\([' . s:ic . s:io . '][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@='
let s:pattern = '\([' . s:ic . s:io . '][-+# ]\?\)\@<=[^*(]\+\(\*\?\(([^)]\+)\)\? :\)\@='
execute "syntax match TagbarScope '" . s:pattern . "'"
let s:pattern = '[' . s:ic . s:io . ']\([-+# ]\)\@='
let s:pattern = '[' . s:ic . s:io . ']\([-+# ]\?\)\@='
execute "syntax match TagbarFoldIcon '" . s:pattern . "'"
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=+\([^-+# ]\)\@='
execute "syntax match TagbarAccessPublic '" . s:pattern . "'"
execute "syntax match TagbarVisibilityPublic '" . s:pattern . "'"
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=#\([^-+# ]\)\@='
execute "syntax match TagbarAccessProtected '" . s:pattern . "'"
execute "syntax match TagbarVisibilityProtected '" . s:pattern . "'"
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=-\([^-+# ]\)\@='
execute "syntax match TagbarAccessPrivate '" . s:pattern . "'"
execute "syntax match TagbarVisibilityPrivate '" . s:pattern . "'"
unlet s:pattern
@@ -57,6 +57,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"