

GitHub - preservim/tagbar: Vim plugin that displays tags in a window, ordered by...
source link: https://github.com/preservim/tagbar
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md
Tagbar: a class outline viewer for Vim
What Tagbar is
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 does this by creating 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.
What Tagbar is not
Tagbar is not a general-purpose tool for managing tags
files. It only
creates the tags it needs on-the-fly in-memory without creating any files.
tags
file management is provided by other plugins, like for example
easytags.
Dependencies
-
Exuberant Ctags >= 5.5, or (highly recommended) any version of Universal Ctags which is a currently maintained fork of Exuberant Ctags with many bugfixes, support for many more formats, and proper Unicode support. Some additional formats can also be handled by other providers such as jsctags, phpctags, or others.
Installation
Extract the archive or clone the repository into a directory in your
'runtimepath'
, or use a plugin manager of your choice like
pathogen. Don't forget to run
:helptags
if your plugin manager doesn't do it for you so you can access the
documentation with :help tagbar
.
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>
If you do this 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 using :help tagbar
.
Support for additional filetypes
For filetypes that are not supported by Exuberant Ctags check out the 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.
Note: If the file structure display is 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 an issue. Since Tagbar uses exuberant-ctags and compatible programs to do the actual file parsing, it is likely that the bug is actually in the program responsible for that filetype 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 against Tagbar.
Screenshots
License
Tagbar is distributed under the terms of the Vim license, see the included LICENSE file.
Contributors
Tagbar was originally written by Jan Larres. It is actively maintained by Caleb Maclennan. At least 45 others have contributed features and bug fixes over the years. Please document issues or submit pull requests on Github.
Recommend
-
120
Tagbar: a class outline viewer for Vim What Tagbar is 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 does this by creating a sidebar that displays...
-
27
TL;DRGet ctags for Rmarkdown and Elm by installing Tagbar and downloading elmtags.py and rmdtags.py. Exhuberant ctags is a formidable way to navigate through your projects. It supports 41 different programming languages, allowing you to jump to...
-
72
README.md NERD Commenter Comment functions so powerful—no comment necessary. Installation Via Plugin Manager (Recommended)
-
59
README.markdown The NERDTree Introduction The NERDTree is a file system explorer for the Vim editor. Using this plugin, users can vi...
-
9
Vimux: easily interact with tmux from vim Vimux was originally inspired by tslime.vim, a plugin that lets you send input to tmux. While tslime.vim works well, it wasn't opti...
-
8
vim-litecorrect Lightweight auto-correction for Vim We type teh when we meant to type the. This plugin is to help us catch the most common of these typos and correct each up...
-
10
vim-wordy Uncover usage problems in your writing Features of the wordy plugin Pure Vimscript; no external services or libraries needed Uses Vim...
-
10
vim-textobj-sentence Improving on Vim's native sentence text object and motion Detecting sentences can be tricky, esp. when the words and punctuation of a sentence are interspersed with abbreviations...
-
9
Vim Markdown Syntax highlighting, matching rules and mappings for the original Markdown and extensions. Installation If you use
-
5
Apple Stores embrace iPhone 14 Pro with new Dynamic Island window displays and more [Gallery] September...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK