Open-source project
preservim/tagbar avatar
preservim/tagbar

Tagbar for Vim and Neovim: a scope-ordered outline sidebar

Vim plugin that displays tags in a window, ordered by scope

6,223 stars477 forksVim ScriptNOASSERTION

At a glance

What is it?
Tagbar renders the ctags output for the current file as a sidebar, nesting methods under the class that defines them. It is a focused outline viewer, not a tags-file manager, and its accuracy depends on the ctags binary you point it at.
Who is it for?
Adopt Tagbar if you already run Universal Ctags and want a scope-ordered outline of the file in front of you without leaving Vim or Neovim; the README's own quickstart is a single key mapping. Do not adopt it as a tags-file manager, because the plugin states it creates tags in memory only and leaves project-wide tag generation to tools like gutentags.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 109 days ago.
What is it written in?
Mainly Vim Script, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What Tagbar solves, and who it is actually for

A long source file hides its own shape. You can jump between functions with search or with a tags file, but neither gives you a standing view of which methods belong to which class, or which functions sit at the top level. Tagbar fills that gap: the README describes it as a sidebar that displays the ctags-generated tags of the current file, ordered by their scope, so that methods in C++ appear under the class that defines them.

The audience is narrow on purpose. If you edit inside Vim or Neovim and you want the outline of one file visible while you work, Tagbar is built for that. If you want project-wide symbol navigation, or a tool that generates and maintains a tags file for a whole repository, the README is explicit that this is not that tool. Tagbar creates the tags it needs on the fly, in memory, without writing any files. Tags file management is delegated to other plugins, with gutentags named as an example.

That division of labour is the design, not a missing feature. It also means the quality of what you see in the sidebar is not Tagbar's to control. The plugin shells out to an external parser, so a wrong outline is usually a parser problem.

How the sidebar is built: ctags output, ordered by scope

Tagbar does not parse your source itself. It runs a ctags implementation over the current buffer's file and turns the resulting tag list into a tree. The ordering rule is scope: a tag that ctags reports as nested inside another tag is drawn underneath it. That is the whole mechanism, and it explains both the plugin's strengths and its failure mode.

The dependency list is short and specific. You need Vim 7.3.1058 or newer, or any version of NeoVim. You also need a ctags implementation, and the README states a preference: any version of Universal Ctags, described as a maintained fork of Exuberant Ctags with many bugfixes, support for many more formats, and proper Unicode support. Exuberant Ctags 5.5 or higher is said to work to some degree but is marked for eventual deprecation. Other providers, such as jsctags and phpctags, can handle some additional formats. If the ctags executable is not on your $PATH, you set the g:tagbar_ctags_bin variable to point at it.

Because parsing is external, the plugin's filetype coverage is really ctags' filetype coverage. The README sends readers to the project wiki for formats Exuberant Ctags does not support, and asks people to record the projects and configurations they find there.

Installing Tagbar and opening the outline for the first time

The README gives two routes: extract the archive or clone the repository into a directory in your 'runtimepath', or use a plugin manager such as pathogen. If your plugin manager does not do it for you, run :helptags so that :help tagbar resolves to the documentation.

The quickstart is a single mapping in your ~/.vimrc. The README's example binds F8 to the toggle command, and notes you can choose any shortcut:

vim
nmap <F8> :TagbarToggle<CR>

After reloading your configuration, open a source file and press F8. A sidebar should appear with the file's tags, nested by scope. Press F8 again to close it.

If the sidebar comes up empty, the usual cause is the ctags binary. When the executable is not in a directory on your $PATH, the README says to set the g:tagbar_ctags_bin variable, and the documentation covers the value it expects. For anything beyond toggling, the README points to the plugin documentation under :help tagbar, which covers more flexible ways to open and close the window and the rest of the functionality.

When the outline is wrong, the bug is probably not in Tagbar

The README devotes a section to this, and it is the most useful part for anyone evaluating the plugin. If the structure displayed for a file looks wrong, the advice is to confirm the bug is in Tagbar before filing an issue, because ctags and compatible programs do the actual parsing. The likely location of the defect is the program responsible for that filetype.

There is a concrete procedure for that: the help entry :h tagbar-issues shows how to run ctags manually, so you can see whether the raw output is already wrong before Tagbar renders it. If ctags is at fault, the README says to report it to the ctags project, since there is nothing the plugin can do about it. The repository also keeps a label for ctags bugs previously filed against Tagbar.

This is a real limitation, not a documentation quirk. You are adopting a viewer whose correctness is delegated. The practical consequence is that upgrading Universal Ctags can change your outline as much as upgrading the plugin can, and a language with weak ctags support will produce a weak sidebar no matter how Tagbar is configured.

Tagbar versus gutentags: different jobs, not competing ones

The most common mistake is treating Tagbar as a tags-file manager. It is not, and the README says so directly. Tagbar builds only the tags it needs, in memory, and writes nothing to disk. A project-wide tags file, regenerated as you edit, is a different problem.

That is the gap gutentags fills, and the README names it as the plugin that provides tags file management. The difference in approach is the scope of the index and its lifetime. Gutentags maintains an on-disk tags file for a project and keeps it current as files change, which is what you want for cross-file jumps with :tag and Ctrl-]. Tagbar keeps a transient, per-buffer structure whose only purpose is the sidebar.

Because the two operate at different levels, running both is normal. One gives you project navigation, the other gives you the shape of the file you are looking at. Choosing between them is only necessary if you actually need just one of those two behaviours. If your goal is jumping to a symbol defined in another file, Tagbar will not do it, and no amount of configuration will change that.

Maintenance, licence and what an upgrade costs you

The repository is not archived, and the last push was on 2026-06-14. The README credits Jan Larres as the original author and names Caleb Maclennan and David Hegland as the current maintainers, with at least 75 other contributors over the project's life. Issues and pull requests are handled on GitHub.

The repository layout is conventional for a Vim plugin: autoload/, plugin/, doc/ and syntax/ directories, plus a .vintrc.yaml for the Vim script linter whose CI badge appears at the top of the README. There are no retrieved releases, so the distribution model is the repository itself rather than tagged artifacts. If you install through a plugin manager that tracks the default branch, your upgrade path is whatever lands on master between updates.

Upgrade cost has two parts. The plugin is Vim script with no build step, so updating it is cheap. The ctags binary is the part that can move your outline: switching from Exuberant Ctags to Universal Ctags changes the parser underneath, and the README already frames Exuberant as something that works to some degree and will be deprecated. Tagbar is distributed under the Vim license, per the LICENSE file and the README's licence section. That is a permissive, GPL-compatible free software licence, but the repository metadata reports the licence as NOASSERTION, so read the LICENSE file yourself rather than relying on a scanner's label. Nothing here is legal advice.

Editorial conclusion

Adopt Tagbar if you already run Universal Ctags and want a scope-ordered outline of the file in front of you without leaving Vim or Neovim; the README's own quickstart is a single key mapping. Do not adopt it as a tags-file manager, because the plugin states it creates tags in memory only and leaves project-wide tag generation to tools like gutentags. Before you commit, run ctags manually on one file from your main language, as the :h tagbar-issues help entry describes, and confirm the structure you see in the sidebar matches the file. If the outline is wrong, the parsing bug is almost certainly in the ctags program for that filetype, not in the plugin.

Frequently asked questions

How do I use tags in Vim with Tagbar?

Tagbar generates the tags it needs for the current file in memory and shows them in a sidebar ordered by scope; it does not create or manage a tags file. The README's quickstart maps a key to :TagbarToggle, for example nmap <F8> :TagbarToggle<CR> in your ~/.vimrc. For project-wide tags file management, the README points to other plugins such as gutentags.

What is Tagbar in Vim?

Tagbar is a Vim plugin that provides an easy way to browse the tags of the current file and get an overview of its structure. It displays ctags-generated tags in a sidebar ordered by scope, so methods appear under the class that defines them.

What is the alternative to Tagbar for Vim?

The README does not present Tagbar as interchangeable with another outline plugin, but it does separate Tagbar from tags file management, naming gutentags as a plugin that provides that. The difference is scope and lifetime: gutentags maintains an on-disk tags file for a project, while Tagbar builds transient in-memory tags for the sidebar.

Official sources

  1. Issues
  2. preservim/tagbar on GitHub
  3. Project website
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/preservim-tagbar.svg)](https://hysenlabs.com/projects/preservim-tagbar)