The Vim class outline viewer
Vim plugin that displays tags in a window, ordered by class etc.
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.
Dependencies
Vim 7.0
Exuberant ctags 5.5
Install
Extract the archive or clone the repository into a directory in your
'runtimepath' or use
pathogen.
Don't forget to run :helptags if you don't use pathogen.
Note: Vim versions < 7.0.167 have a bug that prevents Tagbar from
working. If you are affected by this use this alternate Tagbar
download instead:
zip.
It is on par with version 2.2 but probably won't be updated after
that.
If the ctags executable is not installed in one of the directories in
your $PATH environment variable you have to set the
g:tagbar_ctags_bin variable, see the documentation for more info.
Quickstart
Put something like the following into your ~/.vimrc:
nmap <F8> :TagbarToggle<CR>
Then the F8 key will toggle the Tagbar window. You can of course use
any shortcut you want. For more flexible ways to open and close the
window (and the rest of the functionality) see the documentation.
Support for additional filetypes
The
wiki
describes how to get better support for JavaScript with jsctags and
extensions for additional filetypes that are not supported by
Exuberant Ctags by default. If you create your own extension please
add it to the wiki!
Screenshots
License
Vim license
Author
Jan Larres <jan@majutsushi.net>
Download
Latest stable release
2.5 (2013-03-25)
zip
tar
- New command :TagbarTogglePause to freeze Tagbar in its current state so you
can switch to other files while keeping the old information displayed for
reference. (Kian Ryan)
- New command :TagbarCurrentTag which reports the same information as
currenttag().
- New option tagbar_indent to configure the indentation depth of the tags.
- New option tagbar_show_visibility to allow disabling the visibility symbols.
- Files are now cached locally to avoid additional slowdowns for slow
connections. This also makes it possible to use Tagbar with files accessed
through Netrw.
- Execute ctags again even if the previous run reported errors, in case it was
a parse error that has since been fixed. If the error persists, don't
display it again.
- Improved window switching and Vim exit behaviours. (Techlive Zheng)
- The currenttag() function now can show the prototype instead of the actual
tag, which can be useful in some cases where ctags doesn't report all the
interesting information.
- The prototype shown in the tooltip or command line should now always be
complete, even if it is spread out over more than one line in the source
file.
- The TagbarAccessPublic etc. highlight groups have been renamed to
TagbarVisibilityPublic etc. to keep them in line with standard terminology.
The old names are still supported.
- Various smaller improvements and bugfixes.
Old releases
Latest development version
Download as:
zip
tar
You can also clone the project with Git
by running:
$ git clone git://github.com/majutsushi/tagbar