mirror of
https://github.com/gryf/tagbar.git
synced 2026-05-11 00:42:59 +02:00
Compare commits
93 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c6bbfcdba1 | |||
| d971024947 | |||
| 65632006da | |||
| efa19610f9 | |||
| 3b0bad1372 | |||
| 060248aacb | |||
| 78946a696a | |||
| a92911fa18 | |||
| 342aece556 | |||
| d0d557bf5f | |||
| 91076ee9d5 | |||
| 1b5f3a4e84 | |||
| d0b88b1f78 | |||
| 300cd343ba | |||
| 7808f0ec93 | |||
| bbc5c1fa2d | |||
| d66169f2d6 | |||
| efe0cb3fdb | |||
| 05eb38a018 | |||
| 2431562c1c | |||
| cc6a2958a1 | |||
| 4772da814a | |||
| 6cd89f58bd | |||
| e053a24cfc | |||
| 48704d10fa | |||
| e22147a2d3 | |||
| 7b558822a4 | |||
| 47abcb82cf | |||
| 6402fc98e8 | |||
| 762d5b9968 | |||
| 5f400b06b7 | |||
| a21290dbdc | |||
| cbb6a5f7ba | |||
| 3639b9635a | |||
| 1900bf9da1 | |||
| 7081192a8f | |||
| b4b8eef2b0 | |||
| 6bad51de6a | |||
| 5c06c683d3 | |||
| 172afabdb7 | |||
| 522a158956 | |||
| d9c0b8b2d4 | |||
| f8b49b2f20 | |||
| 053466b5a6 | |||
| fab8af715c | |||
| eb96cd87f1 | |||
| a8d29ed5d1 | |||
| 23ea6d0011 | |||
| 1521c90fc3 | |||
| cd17c19dea | |||
| 9f3e5f6ccb | |||
| ce001d55f4 | |||
| f17f1faa1f | |||
| 310435b009 | |||
| 0d96623015 | |||
| 1537287fce | |||
| f15d130c3a | |||
| 2fd950e96d | |||
| 39beb53fc1 | |||
| 7bae0c5a69 | |||
| d615d070c0 | |||
| 8e4101b990 | |||
| ca7307be6b | |||
| d235ec6dfb | |||
| 8e6d6355d0 | |||
| 8d72cedc41 | |||
| a5fd8d2c75 | |||
| 0b6ce07d78 | |||
| 8aadfd19d3 | |||
| d94b7ad66f | |||
| e7d50d3800 | |||
| ebf1d4b2e1 | |||
| 19dee23d8d | |||
| 7247c1edb7 | |||
| 58b13eaaa9 | |||
| 7ac78715b2 | |||
| 3fab2ae0dd | |||
| 597a0f4940 | |||
| 040d1b99e7 | |||
| ba24621296 | |||
| e5e761b64a | |||
| dda2103363 | |||
| 90f6a780e8 | |||
| 00dc87f351 | |||
| a832db8b47 | |||
| 32d42f5d47 | |||
| d250f26798 | |||
| 04ad66a70e | |||
| dfce41715b | |||
| 8b2fd1c849 | |||
| 5f5e5e1b70 | |||
| db3e802912 | |||
| 6c0f348ad1 |
@@ -1 +0,0 @@
|
||||
_site/
|
||||
@@ -0,0 +1,7 @@
|
||||
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.
|
||||
@@ -1,2 +0,0 @@
|
||||
markdown: rdiscount
|
||||
highlighter: pygments
|
||||
@@ -1,7 +0,0 @@
|
||||
<p>1.0 (2011-02-23)
|
||||
<a href="https://github.com/majutsushi/tagbar/zipball/v1.0">zip</a>
|
||||
<a href="https://github.com/majutsushi/tagbar/tarball/v1.0">tar</a>
|
||||
<ul>
|
||||
<li>Initial release</li>
|
||||
</ul>
|
||||
</p>
|
||||
@@ -1,80 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
|
||||
<title>{{ page.title }}</title>
|
||||
|
||||
<!-- <link rel="stylesheet" href="/css/fonts.css" type="text/css" charset="utf-8" /> -->
|
||||
<link href='https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic|Ubuntu+Mono:400,700' rel='stylesheet' type='text/css'>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin-top: 1.0em;
|
||||
/* background-color: #1C1C1C; */
|
||||
background-color: #202020;
|
||||
font-size: 16px;
|
||||
font-family: Ubuntu, Helvetica, Arial, FreeSans;
|
||||
color: #F0E7D5;
|
||||
/* color: #FFFFFF; */
|
||||
}
|
||||
#container {
|
||||
margin: 0 auto;
|
||||
width: 650px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 3.0em;
|
||||
color: #dddddd;
|
||||
margin-bottom: 3px;
|
||||
text-shadow: #111111 3px 3px 1px;
|
||||
text-align: center;
|
||||
}
|
||||
h1 .small { font-size: 0.4em; }
|
||||
h1 a { text-decoration: none; color: #F0E7D5 }
|
||||
h2 { font-size: 1.5em; color: #dddddd; text-shadow: #111111 1px 1px 1px; }
|
||||
h3 { text-align: left; color: #dddddd; }
|
||||
a { color: #ffcc00; }
|
||||
.description { font-size: 1.2em; margin-bottom: 30px; margin-top: 30px; font-style: italic;}
|
||||
.download { float: right; }
|
||||
pre {
|
||||
background: #333333;
|
||||
color: #ffffff;
|
||||
padding: 8px 15px 8px 15px;
|
||||
border-width: 1px;
|
||||
border-color: #222222;
|
||||
border-style: solid;
|
||||
box-shadow: rgba(0, 0, 0, 0.3) 0 1px 3px 0 inset;
|
||||
font-family: "Ubuntu Mono", monospace;
|
||||
}
|
||||
.pre {
|
||||
background: #333333;
|
||||
color: #ffffff;
|
||||
padding: 2px 3px 2px 3px;
|
||||
border-width: 1px;
|
||||
border-color: #222222;
|
||||
border-style: solid;
|
||||
box-shadow: rgba(0, 0, 0, 0.3) 0 1px 2px 0 inset;
|
||||
font-family: "Ubuntu Mono", monospace;
|
||||
}
|
||||
code { font-family: "Ubuntu Mono", monospace; }
|
||||
hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
|
||||
#title {
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
#title p {
|
||||
font-size: 1.8em;
|
||||
text-align: center;
|
||||
color: #999999;
|
||||
}
|
||||
.footer { text-align:center; padding-top:30px; font-style: italic; }
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="/css/desert.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{{ content }}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
title: 1.0
|
||||
---
|
||||
|
||||
- Initial release
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
title: 1.1
|
||||
---
|
||||
|
||||
- Don't lose syntax highlighting when ':syntax enable' is called
|
||||
- Allow expanding the Vim window when Tagbar is opened
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
title: 1.2
|
||||
---
|
||||
|
||||
- Fix typo in Ruby definition
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
title: 1.5
|
||||
---
|
||||
|
||||
- Type definitions can now include a path to a file with the ctags
|
||||
definition. This is especially useful for ftplugins that can now ship with
|
||||
a complete ctags and Tagbar configuration without requiring user
|
||||
intervention. Thanks to Jan Christoph Ebersbach for the suggestion.
|
||||
- Added autofocus setting by Taybin Rutkin. This will put the cursor in the
|
||||
Tagbar window when it is opened.
|
||||
- The "scopes" field is no longer needed in type definitions, the
|
||||
information is already there in "scope2kind". Existing definitions will be
|
||||
ignored.
|
||||
- Some fixes and improvements related to redrawing and window switching.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
title: 2.0.1
|
||||
---
|
||||
|
||||
- Fixed sorting bug when 'ignorecase' is set
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
title: 2.0
|
||||
---
|
||||
|
||||
- Folding now works correctly. Folds will be preserved when leaving the
|
||||
Tagbar window and when switching between files. Also tag types can be
|
||||
configured to be folded by default, which is useful for things like
|
||||
includes and imports.
|
||||
- DoctorJS/jsctags and other compatible programs are now supported.
|
||||
- All of the highlight groups can now be overridden.
|
||||
- Added keybinding to quickly jump to next/previous top-level tag.
|
||||
- Added Taglist's "p" keybinding for jumping to a tag without leaving the
|
||||
Tagbar window.
|
||||
- Several bugfixes and other small improvements.
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
title: 2.1
|
||||
---
|
||||
|
||||
- Make Tagbar work in (hopefully) all cases under Windows
|
||||
- Handle cases where 'encoding' is different from system encoding, for
|
||||
example on a Chinese Windows with 'encoding' set to "utf-8" (see manual
|
||||
for details in case it doesn't work out-of-the-box)
|
||||
- Fixed a bug with the handling of subtypes like "python.django"
|
||||
- If a session got saved with Tagbar open it now gets restored properly
|
||||
- Locally reset foldmethod/foldexpr in case foldexpr got set to something
|
||||
expensive globally
|
||||
- Tagbar now tries hard to go to the correct window when jumping to a tag
|
||||
- Explain some possible issues with the current jsctags version in the
|
||||
manual
|
||||
- Explicitly check for some possible configuration problems to be able to
|
||||
give better feedback
|
||||
- A few other small fixes
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
title: 2.2
|
||||
---
|
||||
|
||||
- Small incompatible change: TagbarOpen now doesn't jump to the Tagbar window
|
||||
anymore if it is already open. Use "TagbarOpen j" instead or see its
|
||||
documentation for more options.
|
||||
- Tags inside of scopes now have a header displaying their "kind".
|
||||
- The Tagbar contents are now immediately updated on save for files smaller
|
||||
than a configurable size.
|
||||
- Tagbar can now be configured to jump to a tag with only a single-click
|
||||
instead of a double-click.
|
||||
- Most of the script has been moved to the autoload directory, so Vim startup
|
||||
should be faster (thanks to Kien N).
|
||||
- Jumping to tags should work most of the time even if the file has been
|
||||
modified and not saved.
|
||||
- If Ctags has been installed into the default location using Homebrew or
|
||||
MacPorts it should now be found automatically.
|
||||
- Several bugfixes.
|
||||
@@ -1,12 +0,0 @@
|
||||
---
|
||||
title: 2.3
|
||||
---
|
||||
|
||||
- Add a convenience function that allows more flexible ways to automatically
|
||||
open Tagbar.
|
||||
- Replace option tagbar_usearrows with tagbar_iconchars to allow custom
|
||||
characters to be specified. This helps with fonts that don't display the
|
||||
default characters properly.
|
||||
- Remove the need to provide the complete jsctags configuration if jsctags is
|
||||
not found in $PATH, now only the concrete path has to be specified.
|
||||
- Add debugging functionality.
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
title: 2.4
|
||||
---
|
||||
|
||||
- New function tagbar#currenttag() that reports the current tag, for example
|
||||
for putting it into the statusline.
|
||||
- New command TagbarGetTypeConfig for easy customization of an existing type.
|
||||
- Type definitions now can be loaded from ftplugins.
|
||||
- The autoopen() function is now a bit more flexible.
|
||||
- Vala is now supported if Anjuta is installed.
|
||||
- Various other small improvements and bugfixes.
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
title: 2.4.1
|
||||
---
|
||||
|
||||
- Fixed some bugs related to the currenttag() function when it was called
|
||||
before the rest of the plugin was loaded. Also fail silently in case
|
||||
something goes wrong so the statusline doesn't get messed up.
|
||||
- In certain cases highlighting tags in deeply nested folds could cause an
|
||||
error message.
|
||||
- Spellchecking is now correctly getting disabled in the Tagbar window.
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: 2.5
|
||||
---
|
||||
|
||||
- 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.
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
title: 2.6
|
||||
---
|
||||
|
||||
- Added possibility to show tags in the preview window, either manually or
|
||||
automatically.
|
||||
- Allow customizing the statusline, see :help g:tagbar_status_func.
|
||||
- Type configuration can now be project-specific.
|
||||
- The keybindings in the Tagbar window are now configurable.
|
||||
- Improvements to Ctags execution on Windows, thanks to Darcy Parker.
|
||||
- Added function tagbar#currentfile() that returns the path to the file
|
||||
currently being displayed in Tagbar, thanks to Zhao Cai.
|
||||
- Added a :Tagbar command as an alias for :TagbarToggle.
|
||||
- Added an way to ignore specific files in case they create problems.
|
||||
- Optionally show line numbers in the Tagbar window.
|
||||
- The usual bunch of small improvements and bugfixes.
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
title: 2.6.1
|
||||
---
|
||||
|
||||
- Automatically close the preview window when jumping to a tag
|
||||
- Don't forget the previous window in certain situations, which was causing
|
||||
problems with for example fugitive
|
||||
- Fixed toggling kind-specific folds
|
||||
- Fixed ctags error that can happen with Cygwin
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Old releases
|
||||
---
|
||||
|
||||
<a href="https://github.com/majutsushi/tagbar"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<h3>Old releases</h3>
|
||||
|
||||
{% for post in site.posts offset:1 %}
|
||||
|
||||
<span style="font-weight:bold">{{ post.title }}</span> ({{ post.date | date:"%Y-%m-%d" }})
|
||||
<a href="https://github.com/majutsushi/tagbar/zipball/v{{ post.title }}">zip</a>
|
||||
<a href="https://github.com/majutsushi/tagbar/tarball/v{{ post.title }}">tar</a>
|
||||
|
||||
{{ post.content }}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
@@ -1,70 +0,0 @@
|
||||
.highlight { background: #333333; color: #ffffff}
|
||||
.highlight .hll { background-color: #ffffcc }
|
||||
.highlight .c { color: #87ceeb} /* Comment */
|
||||
.highlight .err { color: #ffffff} /* Error */
|
||||
.highlight .g { color: #ffffff} /* Generic */
|
||||
.highlight .k { color: #f0e68c; font-weight: bold } /* Keyword */
|
||||
.highlight .l { color: #ffffff} /* Literal */
|
||||
.highlight .n { color: #ffffff} /* Name */
|
||||
.highlight .o { color: #ffffff} /* Operator */
|
||||
.highlight .x { color: #ffffff} /* Other */
|
||||
.highlight .p { color: #ffffff} /* Punctuation */
|
||||
.highlight .cm { color: #87ceeb} /* Comment.Multiline */
|
||||
.highlight .cp { color: #cd5c5c} /* Comment.Preproc */
|
||||
.highlight .c1 { color: #87ceeb} /* Comment.Single */
|
||||
.highlight .cs { color: #87ceeb} /* Comment.Special */
|
||||
.highlight .gd { color: #0000c0; font-weight: bold; background-color: #008080 } /* Generic.Deleted */
|
||||
.highlight .ge { color: #c000c0; text-decoration: underline} /* Generic.Emph */
|
||||
.highlight .gr { color: #c0c0c0; font-weight: bold; background-color: #c00000 } /* Generic.Error */
|
||||
.highlight .gh { color: #cd5c5c} /* Generic.Heading */
|
||||
.highlight .gi { color: #ffffff; background-color: #0000c0 } /* Generic.Inserted */
|
||||
.highlight .go { color: #add8e6; font-weight: bold; background-color: #4d4d4d } /* Generic.Output */
|
||||
.highlight .gp { color: #ffffff} /* Generic.Prompt */
|
||||
.highlight .gs { color: #ffffff} /* Generic.Strong */
|
||||
.highlight .gu { color: #cd5c5c} /* Generic.Subheading */
|
||||
.highlight .gt { color: #c0c0c0; font-weight: bold; background-color: #c00000 } /* Generic.Traceback */
|
||||
.highlight .kc { color: #f0e68c; font-weight: bold } /* Keyword.Constant */
|
||||
.highlight .kd { color: #f0e68c; font-weight: bold } /* Keyword.Declaration */
|
||||
.highlight .kn { color: #f0e68c; font-weight: bold } /* Keyword.Namespace */
|
||||
.highlight .kp { color: #f0e68c; font-weight: bold } /* Keyword.Pseudo */
|
||||
.highlight .kr { color: #f0e68c; font-weight: bold } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #bdb76b; font-weight: bold } /* Keyword.Type */
|
||||
.highlight .ld { color: #ffffff} /* Literal.Date */
|
||||
.highlight .m { color: #ffffff} /* Literal.Number */
|
||||
.highlight .s { color: #ffffff} /* Literal.String */
|
||||
.highlight .na { color: #ffffff} /* Name.Attribute */
|
||||
.highlight .nb { color: #ffffff} /* Name.Builtin */
|
||||
.highlight .nc { color: #ffffff} /* Name.Class */
|
||||
.highlight .no { color: #ffa0a0} /* Name.Constant */
|
||||
.highlight .nd { color: #ffffff} /* Name.Decorator */
|
||||
.highlight .ni { color: #ffdead} /* Name.Entity */
|
||||
.highlight .ne { color: #ffffff} /* Name.Exception */
|
||||
.highlight .nf { color: #ffffff} /* Name.Function */
|
||||
.highlight .nl { color: #ffffff} /* Name.Label */
|
||||
.highlight .nn { color: #ffffff} /* Name.Namespace */
|
||||
.highlight .nx { color: #ffffff} /* Name.Other */
|
||||
.highlight .py { color: #ffffff} /* Name.Property */
|
||||
.highlight .nt { color: #f0e68c} /* Name.Tag */
|
||||
.highlight .nv { color: #98fb98} /* Name.Variable */
|
||||
.highlight .ow { color: #ffffff} /* Operator.Word */
|
||||
.highlight .w { color: #ffffff} /* Text.Whitespace */
|
||||
.highlight .mf { color: #ffffff} /* Literal.Number.Float */
|
||||
.highlight .mh { color: #ffffff} /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #ffffff} /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #ffffff} /* Literal.Number.Oct */
|
||||
.highlight .sb { color: #ffffff} /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #ffffff} /* Literal.String.Char */
|
||||
.highlight .sd { color: #ffffff} /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #ffffff} /* Literal.String.Double */
|
||||
.highlight .se { color: #ffffff} /* Literal.String.Escape */
|
||||
.highlight .sh { color: #ffffff} /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #ffffff} /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #ffffff} /* Literal.String.Other */
|
||||
.highlight .sr { color: #ffffff} /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #ffffff} /* Literal.String.Single */
|
||||
.highlight .ss { color: #ffffff} /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #ffffff} /* Name.Builtin.Pseudo */
|
||||
.highlight .vc { color: #98fb98} /* Name.Variable.Class */
|
||||
.highlight .vg { color: #98fb98} /* Name.Variable.Global */
|
||||
.highlight .vi { color: #98fb98} /* Name.Variable.Instance */
|
||||
.highlight .il { color: #ffffff} /* Literal.Number.Integer.Long */
|
||||
+609
@@ -0,0 +1,609 @@
|
||||
*tagbar.txt* Display tags of a file in their correct scope
|
||||
|
||||
Author: Jan Larres <jan@majutsushi.net>
|
||||
Licence: Vim licence, see |license|
|
||||
Homepage: http://majutsushi.github.com/tagbar/
|
||||
Version: 1.0
|
||||
|
||||
==============================================================================
|
||||
Contents *tagbar* *tagbar-contents*
|
||||
|
||||
1. Intro ........................... |tagbar-intro|
|
||||
Pseudo-tags ................... |tagbar-pseudotags|
|
||||
Supported features ............ |tagbar-features|
|
||||
2. Requirements .................... |tagbar-requirements|
|
||||
3. Installation .................... |tagbar-installation|
|
||||
4. Usage ........................... |tagbar-usage|
|
||||
Commands ...................... |tagbar-commands|
|
||||
Key mappings .................. |tagbar-keys|
|
||||
5. Configuration ................... |tagbar-configuration|
|
||||
6. Extending Tagbar ................ |tagbar-extend|
|
||||
7. Bugs and limitations ............ |tagbar-bugs|
|
||||
8. History ......................... |tagbar-history|
|
||||
9. Todo ............................ |tagbar-todo|
|
||||
10. Credits ......................... |tagbar-credits|
|
||||
|
||||
==============================================================================
|
||||
1. Intro *tagbar-intro*
|
||||
|
||||
Tagbar is a 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.
|
||||
|
||||
Let's say we have the following code inside of a C++ file:
|
||||
>
|
||||
namespace {
|
||||
char a;
|
||||
|
||||
class Foo
|
||||
{
|
||||
public:
|
||||
Foo();
|
||||
~Foo();
|
||||
private:
|
||||
int var;
|
||||
};
|
||||
};
|
||||
<
|
||||
Then Tagbar would display the tag information like so:
|
||||
>
|
||||
__anon1* : namespace
|
||||
Foo : class
|
||||
+Foo()
|
||||
+~Foo()
|
||||
-var
|
||||
a
|
||||
<
|
||||
This example shows several important points. First, the tags are listed
|
||||
indented below the scope they are defined in. Second, the type of a scope is
|
||||
listed after its name and a colon. Third, tags for which the access/visibility
|
||||
information is known are prefixed with a symbol indicating that.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
PSEUDO-TAGS *tagbar-pseudotags*
|
||||
|
||||
The example also introduces the concept of "pseudo-tags". Pseudo-tags are tags
|
||||
that are not explicitly defined in the file but have children in it. In this
|
||||
example the namespace doesn't have a name and thus ctags doesn't generate a
|
||||
tag for it, but since it has children it still needs to be displayed using an
|
||||
auto-generated name.
|
||||
|
||||
Another case where pseudo-tags appear is in C++ implementation files. Since
|
||||
classes are usually defined in a header file but the member methods and
|
||||
variables in the implementation file the class itself won't generate a tag
|
||||
in that file.
|
||||
|
||||
Since pseudo-tags don't really exist they cannot be jumped to from the Tagbar
|
||||
window.
|
||||
|
||||
Pseudo-tags are denoted with an asterisk ('*') at the end of their name.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
SUPPORTED FEATURES *tagbar-features*
|
||||
|
||||
The following features are supported by Tagbar:
|
||||
|
||||
- Display tags under their correct scope.
|
||||
- Automatically update the tags when switching between buffers and editing
|
||||
files.
|
||||
- Display visibility information of tags if available.
|
||||
- Highlight the tag near the cursor while editing files.
|
||||
- Jump to a tag from the Tagbar window.
|
||||
- Display the complete prototype of a tag.
|
||||
- Tags can be sorted either by name or order of appearance in the file.
|
||||
- Scopes can be folded to hide uninteresting information.
|
||||
- Supports all of the languages that ctags does, i.e. Ant, Assembler, ASP,
|
||||
Awk, Basic, BETA, C, C++, C#, COBOL, DosBatch, Eiffel, Erlang, Flex,
|
||||
Fortran, HTML, Java, JavaScript, Lisp, Lua, Make, MatLab, OCaml, Pascal,
|
||||
Perl, PHP, Python, REXX, Ruby, Scheme, Shell script, SLang, SML, SQL, Tcl,
|
||||
Tex, Vera, Verilog, VHDL, Vim and YACC.
|
||||
- Can be extended to support arbitrary new types.
|
||||
|
||||
==============================================================================
|
||||
2. Requirements *tagbar-requirements*
|
||||
|
||||
The following requirements have to be met in order to be able to use tagbar:
|
||||
|
||||
- Vim 7.0 or higher. Older versions will not work since Tagbar uses data
|
||||
structures that were only introduced in Vim 7.
|
||||
- Exuberant ctags 5.5 or higher. Ctags is the program that generates the
|
||||
tag information that Tagbar uses. It is shipped with most Linux
|
||||
distributions, otherwise it can be downloaded from the following
|
||||
website:
|
||||
|
||||
http://ctags.sourceforge.net/
|
||||
|
||||
Tagbar will work on any platform that ctags runs on -- this includes
|
||||
UNIX derivatives, Mac OS X and Windows. Note that other versions like
|
||||
GNU ctags will not work.
|
||||
Tagbar generates the tag information by itself and doesn't need already
|
||||
existing tag files.
|
||||
- File type detection must be turned on in vim. This can be done with the
|
||||
following command in your vimrc:
|
||||
>
|
||||
filetype on
|
||||
<
|
||||
See |filetype| for more information.
|
||||
- Tagbar will not work in |restricted-mode|.
|
||||
|
||||
==============================================================================
|
||||
3. Installation *tagbar-installation*
|
||||
|
||||
Use the normal Vimball install method for installing tagbar.vba:
|
||||
>
|
||||
vim tagbar.vba
|
||||
:so %
|
||||
:q
|
||||
<
|
||||
Alternatively you can clone the git repository and then add the path to
|
||||
'runtimepath' or use the pathogen plugin. Don't forget to run |:helptags| if
|
||||
you're not using pathogen.
|
||||
|
||||
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 |g:tagbar_ctags_bin|.
|
||||
|
||||
==============================================================================
|
||||
4. Usage *tagbar-usage*
|
||||
|
||||
There are essentially two ways to use Tagbar:
|
||||
|
||||
1. Have it running all the time in a window on the side of the screen. In
|
||||
this case Tagbar will update its contents whenever the source file is
|
||||
changed and highlight the tag the cursor is currently on in the file. If
|
||||
a tag is selected in Tagbar the file window will jump to the tag and the
|
||||
Tagbar window will stay open. |g:tagbar_autoclose| has to be unset for
|
||||
this mode.
|
||||
2. Only open Tagbar when you want to jump to a specific tag and have it
|
||||
close automatically once you have selected one. This can be useful for
|
||||
example for small screens where a permanent window would take up too much
|
||||
space. You have to set the option |g:tagbar_autoclose| in this case. The
|
||||
cursor will also automatically jump to the Tagbar window when opening it.
|
||||
|
||||
Opening and closing the Tagbar window~
|
||||
Use |:TagbarOpen| or |:TagbarToggle| to open the Tagbar window if it is
|
||||
closed. By default the window is opened on the right side, set the option
|
||||
|g:tagbar_left| to open it on the left instead. If the window is already open,
|
||||
|:TagbarOpen| will jump to it and |:TagbarToggle| will close it again.
|
||||
|:TagbarClose| will simply close the window if it is open.
|
||||
|
||||
It is probably a good idea to assign a key to these commands. For example, put
|
||||
this in your |vimrc|:
|
||||
>
|
||||
nnoremap <silent> <F9> :TagbarToggle<CR>
|
||||
<
|
||||
You can then open and close Tagbar by simply pressing the <F9> key.
|
||||
|
||||
You can also use |:TagbarOpenAutoClose| to open the Tagbar window, jump to it
|
||||
and have it close automatically on tag selection regardless of the
|
||||
|g:tagbar_autoclose| setting.
|
||||
|
||||
Jumping to tags~
|
||||
When you're inside the Tagbar window you can jump to the definition of a tag
|
||||
by moving the cursor to a tag and pressing <Enter> or double-clicking on it
|
||||
with the mouse. The source file will then move to the definition and put the
|
||||
cursor in the corresponding line. This won't work for pseudo-tags.
|
||||
|
||||
Sorting~
|
||||
You can sort the tags in the Tagbar window in two ways: by name or by file
|
||||
order. Sorting them by name simply displays the tags in their alphabetical
|
||||
order under their corresponding scope. Sorting by file order means that the
|
||||
tags keep the order they have in the source file, but are still associated
|
||||
with the correct scope. You can change the sort order by pressing the "s" key
|
||||
in the Tagbar window. The current sort order is displayed in the statusbar of
|
||||
the Tagbar window.
|
||||
|
||||
Folding~
|
||||
The displayed scopes (and unscoped types) can be folded to hide untinteresting
|
||||
information. Unfortunately the folding state is lost once you leave the Tagbar
|
||||
window, see |tagbar-bugs|.
|
||||
|
||||
Displaying the prototype of a tag~
|
||||
Tagbar can display the prototype of a tag. More precisely it can display the
|
||||
line in which the tag is defined. This can be done by either pressing <Space>
|
||||
when on a tag or hovering over a tag with the mouse. In the former case the
|
||||
prototype will be displayed in the command line |Command-line|, in the latter
|
||||
case it will be displayed in a pop-up window. The prototype will also be
|
||||
displayed when the cursor stays on a tag for 'updatetime' milliseconds.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
COMMANDS *tagbar-commands*
|
||||
|
||||
:TagbarOpen
|
||||
Open the Tagbar if it is closed. In case it is already open jump to it.
|
||||
|
||||
:TagbarClose
|
||||
Close the Tagbar window if it is open.
|
||||
|
||||
:TagbarToggle
|
||||
Open the Tagbar window if it is closed or close it if it is open.
|
||||
|
||||
:TagbarOpenAutoClose
|
||||
Open the Tagbar window and close it on tag selection, regardless of the
|
||||
setting of |g:tagbar_autoclose|. If it was already open jump to it.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
KEY MAPPINGS *tagbar-keys*
|
||||
|
||||
These mappings are valid in the Tagbar window:
|
||||
|
||||
<F1> Display key mapping help.
|
||||
<CR>/<Enter> Jump to the tag under the cursor. Doesn't work for pseudo-tags.
|
||||
<2-LeftMouse> Same as <CR>.
|
||||
<Space> Display the prototype of the current tag (i.e. the line defining
|
||||
it) in the command line.
|
||||
+ Open the fold under the cursor.
|
||||
- Close the fold under the cursor.
|
||||
* Open all folds.
|
||||
= Close all folds.
|
||||
s Toggle sort order between name and file order.
|
||||
x Toggle zooming the window.
|
||||
q Close the Tagbar window.
|
||||
|
||||
==============================================================================
|
||||
5. Configuration *tagbar-configuration*
|
||||
|
||||
*g:tagbar_ctags_bin*
|
||||
g:tagbar_ctags_bin~
|
||||
Use this option to specify the location of your ctags executable. Only needed
|
||||
if it is not in one of the directories in your $PATH environment variable.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_ctags_bin = 'C:\Ctags5.8\ctags.exe'
|
||||
<
|
||||
|
||||
*g:tagbar_left*
|
||||
g:tagbar_left~
|
||||
By default the Tagbar window will be opened on the right-hand side of vim. Set
|
||||
this option to open it on the left instead.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_left = 1
|
||||
<
|
||||
|
||||
*g:tagbar_width*
|
||||
g:tagbar_width~
|
||||
Width of the Tagbar window in characters. The default is 40.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_width = 30
|
||||
<
|
||||
|
||||
*g:tagbar_autoclose*
|
||||
g:tagbar_autoclose~
|
||||
If you set this option the Tagbar window will automatically close when you
|
||||
jump to a tag. The default is to not automatically close the window.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_autoclose = 1
|
||||
<
|
||||
|
||||
*g:tagbar_sort*
|
||||
g:tagbar_sort~
|
||||
If this option is set the tags are sorted according to their name. If it is
|
||||
unset they are sorted according to their order in the source file. The default
|
||||
is to sort them by name.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_sort = 0
|
||||
<
|
||||
|
||||
*g:tagbar_compact*
|
||||
g:tagbar_compact~
|
||||
Setting this option will result in Tagbar omitting the short help at the
|
||||
top of the window and the blank lines in between top-level scopes in order to
|
||||
save screen real estate. The default is to not use compact mode.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_compact = 1
|
||||
<
|
||||
==============================================================================
|
||||
6. Extending Tagbar *tagbar-extend*
|
||||
|
||||
Tagbar has a flexible mechanism for extending the existing file type (i.e.
|
||||
language) definitions. This can be used both to change the settings of the
|
||||
existing types and to add completely new types.
|
||||
|
||||
Every type definition in Tagbar is a dictionary with the following keys:
|
||||
|
||||
ctagstype: The name of the language as recognized by ctags. Use the command >
|
||||
ctags --list-languages
|
||||
< to get a list of the languages ctags supports. The case doesn't
|
||||
matter.
|
||||
kinds: A list of the "language kinds" that should be listed in Tagbar,
|
||||
ordered by the order they should appear in in the Tagbar window.
|
||||
Use the command >
|
||||
ctags --list-kinds={language name}
|
||||
< to get a list of the kinds ctags supports for a given language. An
|
||||
entry in this list is a string with two parts separated by a
|
||||
colon: the first part is the one-character abbreviation that ctags
|
||||
uses, and the second part is an arbitrary string that will be used
|
||||
in Tagbar as the header for the tags of this kind that are not
|
||||
listed under a specific scope. For example, the string >
|
||||
"f:functions"
|
||||
< would list all the function definitions in a file under the header
|
||||
"functions".
|
||||
scopes: A list of the scopes that ctags supports for a given language, for
|
||||
example classes, structs etc. Unfortunately there is no ctags
|
||||
option to list the scopes, you have to look at the tags ctags
|
||||
generates manually. For example, let's say we have a C++ file
|
||||
"test.cpp" with the following contents: >
|
||||
class Foo
|
||||
{
|
||||
public:
|
||||
Foo();
|
||||
~Foo();
|
||||
private:
|
||||
int var;
|
||||
};
|
||||
< We then run ctags in the followin way: >
|
||||
ctags -f - --format=2 --excmd=pattern --fields=nksazSmt --extra= test.cpp
|
||||
< Then the output for the variable "var" would look like this: >
|
||||
var tmp.cpp /^ int var;$/;" kind:m line:11 class:Foo access:private
|
||||
< This shows that the scope name for an entry in a C++ class is
|
||||
simply "class". So you would need to put this exact word into the
|
||||
"scopes" list. The order again determines the order in which the
|
||||
tags will be displayed in Tagbar.
|
||||
sro: The scope resolution operator. For example, in C++ it is "::" and
|
||||
in Java it is ".". When in doubt run ctags as shown above and look
|
||||
at the output.
|
||||
kind2scope: A dictionary describing the mapping of tag kinds (in their
|
||||
one-character representation) to the scopes their children will
|
||||
appear in.
|
||||
scope2kind: The opposite of the above, mapping scopes to the kinds of their
|
||||
parents. Most of the time it is the exact inverse of the above,
|
||||
but in some cases it can be different, for example when more than
|
||||
one kind maps to the same scope. If it is the exact inverse for
|
||||
your language you only need to specify one of the two keys.
|
||||
replace: If you set this entry to 1 your definition will completely replace
|
||||
{optional} an existing default definition. This is useful if you want to
|
||||
disable scopes for a file type for some reason. Note that in this
|
||||
case you have to provide all the needed entries yourself!
|
||||
sort: This entry can be used to override the global sort setting for
|
||||
{optional} this specific file type. The meaning of the value is the same as
|
||||
with the global setting, that is if you want to sort tags by name
|
||||
set it to 1 and if you want to sort them according to their order
|
||||
in the file set it to 0.
|
||||
|
||||
You then have to assign this dictionary to a variable with the name
|
||||
>
|
||||
g:tagbar_type_{vim filetype}
|
||||
<
|
||||
For example, for C++ the name would be "g:tagbar_type_cpp". If you don't know
|
||||
the vim file type run the following command:
|
||||
>
|
||||
:set filetype?
|
||||
<
|
||||
and vim will display the file type of the current buffer.
|
||||
|
||||
Example: C++~
|
||||
Here is a complete example that shows the default configuration for C++ as
|
||||
used in Tagbar.
|
||||
>
|
||||
let g:tagbar_type_cpp = {
|
||||
\ 'ctagstype' : 'c++',
|
||||
\ 'kinds' : [
|
||||
\ 'd:macros',
|
||||
\ 'p:prototypes',
|
||||
\ 'g:enums',
|
||||
\ 'e:enumerators',
|
||||
\ 't:typedefs',
|
||||
\ 'n:namespaces',
|
||||
\ 'c:classes',
|
||||
\ 's:structs',
|
||||
\ 'u:unions',
|
||||
\ 'f:functions',
|
||||
\ 'm:members',
|
||||
\ 'v:variables'
|
||||
\ ],
|
||||
\ 'scopes' : [
|
||||
\ 'namespace',
|
||||
\ 'class',
|
||||
\ 'struct',
|
||||
\ 'enum',
|
||||
\ 'union'
|
||||
\ ],
|
||||
\ 'sro' : '::',
|
||||
\ 'kind2scope' : {
|
||||
\ 'g' : 'enum',
|
||||
\ 'n' : 'namespace',
|
||||
\ 'c' : 'class',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ },
|
||||
\ 'scope2kind' : {
|
||||
\ 'enum' : 'g',
|
||||
\ 'namespace' : 'n',
|
||||
\ 'class' : 'c',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
\ }
|
||||
<
|
||||
|
||||
Which of the keys you have to specify depends on what you want to do.
|
||||
|
||||
Changing an existing definition~
|
||||
If you want to change an existing definition you only need to specify the
|
||||
parts that you want to change. It probably only makes sense to change "kinds"
|
||||
and/or "scopes", which would be the case if you wanted to exclude certain
|
||||
kinds from appearing in Tagbar or if you want to change their order. As an
|
||||
example, if you didn't want Tagbar to show prototypes for C++ files and switch
|
||||
the order of enums and typedefs, you would do it like this:
|
||||
>
|
||||
let g:tagbar_type_cpp = {
|
||||
\ 'kinds' : [
|
||||
\ 'd:macros',
|
||||
\ 'g:enums',
|
||||
\ 't:typedefs',
|
||||
\ 'e:enumerators',
|
||||
\ 'n:namespaces',
|
||||
\ 'c:classes',
|
||||
\ 's:structs',
|
||||
\ 'u:unions',
|
||||
\ 'f:functions',
|
||||
\ 'm:members',
|
||||
\ 'v:variables'
|
||||
\ ]
|
||||
\ }
|
||||
<
|
||||
Compare with the complete example above to see the exact change.
|
||||
|
||||
Adding a definition for a new language/file type~
|
||||
In order to be able to add a new language to Tagbar you first have to create a
|
||||
configuration for ctags that it can use to parse the files. This can be done
|
||||
in two ways:
|
||||
|
||||
1. Use the --regex argument for specifying regular expressions that are used
|
||||
to parse the files. An example of this is given below. A disadvantage of
|
||||
this approach is that you can't specify scopes.
|
||||
2. Write a parser plugin in C for ctags. This approach is much more powerful
|
||||
than the regex approach since you can make use of all of ctags'
|
||||
functionality but it also requires much more work. Read the ctags
|
||||
documentation for more information about how to do this.
|
||||
|
||||
For the first approach the only keys that are needed in the Tagbar definition
|
||||
are "ctagstype" and "kinds". A definition that supports scopes has to define
|
||||
those two and in addition "scopes", "sro" and at least one of "kind2scope" and
|
||||
"scope2kind".
|
||||
|
||||
Let's assume we want to add support for LaTeX to Tagbar using the regex
|
||||
approach. First we put the following text into ~/.ctags:
|
||||
>
|
||||
--langdef=latex
|
||||
--langmap=latex:.tex
|
||||
--regex-latex=/^\\tableofcontents/TABLE OF CONTENTS/s,toc/
|
||||
--regex-latex=/^\\frontmatter/FRONTMATTER/s,frontmatter/
|
||||
--regex-latex=/^\\mainmatter/MAINMATTER/s,mainmatter/
|
||||
--regex-latex=/^\\backmatter/BACKMATTER/s,backmatter/
|
||||
--regex-latex=/^\\bibliography\{/BIBLIOGRAPHY/s,bibliography/
|
||||
--regex-latex=/^\\part[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/PART \2/s,part/
|
||||
--regex-latex=/^\\part[[:space:]]*\*[[:space:]]*\{([^}]+)\}/PART \1/s,part/
|
||||
--regex-latex=/^\\chapter[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/CHAP \2/s,chapter/
|
||||
--regex-latex=/^\\chapter[[:space:]]*\*[[:space:]]*\{([^}]+)\}/CHAP \1/s,chapter/
|
||||
--regex-latex=/^\\section[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\. \2/s,section/
|
||||
--regex-latex=/^\\section[[:space:]]*\*[[:space:]]*\{([^}]+)\}/\. \1/s,section/
|
||||
--regex-latex=/^\\subsection[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\.\. \2/s,subsection/
|
||||
--regex-latex=/^\\subsection[[:space:]]*\*[[:space:]]*\{([^}]+)\}/\.\. \1/s,subsection/
|
||||
--regex-latex=/^\\subsubsection[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\.\.\. \2/s,subsubsection/
|
||||
--regex-latex=/^\\subsubsection[[:space:]]*\*[[:space:]]*\{([^}]+)\}/\.\.\. \1/s,subsubsection/
|
||||
--regex-latex=/^\\includegraphics[[:space:]]*(\[[^]]*\])?[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\3/g,graphic+listing/
|
||||
--regex-latex=/^\\lstinputlisting[[:space:]]*(\[[^]]*\])?[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\3/g,graphic+listing/
|
||||
--regex-latex=/\\label[[:space:]]*\{([^}]+)\}/\1/l,label/
|
||||
--regex-latex=/\\ref[[:space:]]*\{([^}]+)\}/\1/r,ref/
|
||||
--regex-latex=/\\pageref[[:space:]]*\{([^}]+)\}/\1/p,pageref/
|
||||
<
|
||||
This will create a new language definition with the name "latex" and associate
|
||||
it with files with the extension ".tex". It will also define the kinds "s" for
|
||||
sections, chapters and the like, "g" for included graphics, "l" for labels,
|
||||
"r" for references and "p" for page references. See the ctags documentation
|
||||
for more information about the exact syntax.
|
||||
|
||||
Now we have to create the Tagbar language definition in our vimrc:
|
||||
>
|
||||
let g:tagbar_type_tex = {
|
||||
\ 'ctagstype' : 'latex',
|
||||
\ 'kinds' : [
|
||||
\ 's:sections',
|
||||
\ 'g:graphics',
|
||||
\ 'l:labels',
|
||||
\ 'r:refs',
|
||||
\ 'p:pagerefs'
|
||||
\ ],
|
||||
\ 'sort' : 0
|
||||
\ }
|
||||
<
|
||||
Sort has been disabled for LaTeX so that the sections appear in their correct
|
||||
order. They unfortunately can't be shown nested with their correct scopes
|
||||
since as already mentioned the regular expression approach doesn't support
|
||||
that.
|
||||
|
||||
Tagbar should now be able to show the sections and other tags from LaTeX
|
||||
files.
|
||||
|
||||
==============================================================================
|
||||
7. Bugs and limitations *tagbar-bugs*
|
||||
|
||||
- Nested pseudo-tags cannot be properly parsed since only the direct parent
|
||||
scope of a tag gets assigned a type, the type of the grandparents is not
|
||||
reported by ctags (assuming the grandparents don't have direct, real
|
||||
children).
|
||||
|
||||
For example, if we have a C++ with the following content:
|
||||
>
|
||||
foo::Bar::init()
|
||||
{
|
||||
// ...
|
||||
}
|
||||
foo::Baz::method()
|
||||
{
|
||||
// ...
|
||||
}
|
||||
<
|
||||
In this case the type of "foo" is not known. Is it a namespace? A class?
|
||||
For this reason the methods are displayed in Tagbar like this:
|
||||
>
|
||||
foo::Bar* : class
|
||||
init()
|
||||
foo::Baz* : class
|
||||
method()
|
||||
<
|
||||
- Scope-defining tags at the top level that have the same name but a
|
||||
different kind/scope type can lead to an incorrect display. For example,
|
||||
the following Python code will incorrectly insert a pseudo-tag "Inner2"
|
||||
into the "test" class:
|
||||
>
|
||||
class test:
|
||||
class Inner:
|
||||
def foo(self):
|
||||
pass
|
||||
|
||||
def test():
|
||||
class Inner2:
|
||||
def bar(self):
|
||||
pass
|
||||
<
|
||||
I haven't found a clean way around this yet, but it shouldn't be much of a
|
||||
problem in practice anyway. Tags with the same name at any other level are
|
||||
no problem, though.
|
||||
|
||||
- The fold state of the Tagbar window is lost when the window is left.
|
||||
Again, I don't know of any proper way around this that still allows
|
||||
auto-updating -- |winsaveview()| doesn't really help here.
|
||||
|
||||
==============================================================================
|
||||
8. History *tagbar-history*
|
||||
|
||||
1.0 (2011-02-23)
|
||||
- Initial release
|
||||
|
||||
==============================================================================
|
||||
9. Todo *tagbar-todo*
|
||||
|
||||
- Allow filtering the Tagbar content by some criteria like tag name,
|
||||
visibility, kind ...
|
||||
- Integrate Tagbar with the FSwitch plugin to provide header file
|
||||
information in C/C++.
|
||||
- Allow jumping to a tag in the preview window, a split window or a new tab.
|
||||
|
||||
==============================================================================
|
||||
10. Credits *tagbar-credits*
|
||||
|
||||
Tagbar was written by Jan Larres and is released under the Vim licence, see
|
||||
|license|. It was heavily inspired by the Taglist plugin by Yegappan
|
||||
Lakshmanan and uses a small amount of code from it.
|
||||
|
||||
Original taglist copyright notice:
|
||||
Permission is hereby granted to use and distribute this code, with or without
|
||||
modifications, provided that this copyright notice is copied with it. Like
|
||||
anything else that's free, taglist.vim is provided *as is* and comes with no
|
||||
warranty of any kind, either expressed or implied. In no event will the
|
||||
copyright holder be liable for any damamges resulting from the use of this
|
||||
software.
|
||||
-77
@@ -1,77 +0,0 @@
|
||||
---
|
||||
layout: default
|
||||
title: Tagbar, the Vim class outline viewer
|
||||
---
|
||||
|
||||
<a href="https://github.com/majutsushi/tagbar"><img alt="Fork me on GitHub" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" style="position: absolute; top: 0; right: 0; border: 0;"/></a>
|
||||
<div id="container">
|
||||
<div id="title">
|
||||
<h1><a href="https://github.com/majutsushi/tagbar">Tagbar</a></h1>
|
||||
<p>A class outline viewer for Vim</p>
|
||||
</div>
|
||||
<div id="markdown-output"><h2>What Tagbar is</h2><p>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.</p><h2>What Tagbar is not</h2><p>Tagbar is not a general-purpose tool for managing <code>tags</code> files. It only
|
||||
creates the tags it needs on-the-fly in-memory without creating any files.
|
||||
<code>tags</code> file management is provided by other plugins, like for example
|
||||
<a href="https://github.com/xolox/vim-easytags">easytags</a>.</p><h2>Dependencies</h2><p><a href="http://www.vim.org/">Vim 7.0</a> (But see note below)<br/>
|
||||
<a href="http://ctags.sourceforge.net/">Exuberant ctags 5.5</a></p><h2>Installation</h2><p>Extract the archive or clone the repository into a directory in your
|
||||
<code>'runtimepath'</code>, or use a plugin manager of your choice like
|
||||
<a href="https://github.com/tpope/vim-pathogen">pathogen</a>. Don't forget to run
|
||||
<code>:helptags</code> if your plugin manager doesn't do it for you so you can access the
|
||||
documentation with <code>:help tagbar</code>.</p><p>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:
|
||||
<a href="https://github.com/majutsushi/tagbar/zipball/70fix">zip</a>. It is on par with
|
||||
version 2.2 but probably won't be updated after that due to the amount of
|
||||
changes required.</p><p>If the ctags executable is not installed in one of the directories in your
|
||||
<code>$PATH</code> environment variable you have to set the <code>g:tagbar_ctags_bin</code>
|
||||
variable, see the documentation for more info.</p><h2>Quickstart</h2><p>Put something like the following into your ~/.vimrc:</p><pre><code class="vim">nmap <F8> :TagbarToggle<CR>
|
||||
</code></pre><p>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.</p><h2>Support for additional filetypes</h2><p>For filetypes that are not supported by Exuberant Ctags check out <a href="https://github.com/majutsushi/tagbar/wiki">the
|
||||
wiki</a> 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.</p><h2>Note: If the file structure display is wrong</h2><p>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
|
||||
<a href="http://ctags.sourceforge.net/">exuberant-ctags</a> 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.</p><p>There is an example in <code>:h tagbar-issues</code> 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!</p><p>You can also have a look at <a href="https://github.com/majutsushi/tagbar/issues?labels=ctags-bug&page=1&state=closed">ctags bugs that have previously been filed
|
||||
against Tagbar</a>.</p><h2>Screenshots</h2><p><img alt="screenshot1" src="https://i.imgur.com/Sf9Ls2r.png"/>
|
||||
<img alt="screenshot2" src="https://i.imgur.com/n4bpPv3.png"/></p><h2>License</h2><p>Vim license, see LICENSE</p><h2>Maintainer</h2><p>Jan Larres <<a href="mailto:jan@majutsushi.net">jan@majutsushi.net</a>></p></div>
|
||||
<h2>Download</h2>
|
||||
<h3>Latest stable release</h3>
|
||||
|
||||
{% for post in site.posts limit:1 %}
|
||||
|
||||
<span style="font-weight:bold">{{ post.title }}</span> ({{ post.date | date:"%Y-%m-%d" }})
|
||||
<a href="https://github.com/majutsushi/tagbar/zipball/v{{ post.title }}">zip</a>
|
||||
<a href="https://github.com/majutsushi/tagbar/tarball/v{{ post.title }}">tar</a>
|
||||
|
||||
{{ post.content }}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
<a href="archive">Old releases</a>
|
||||
<h3>Latest development version</h3>
|
||||
<p>
|
||||
Download as:
|
||||
<a href="https://github.com/majutsushi/tagbar/zipball/master">zip</a>
|
||||
<a href="https://github.com/majutsushi/tagbar/tarball/master">tar</a>
|
||||
</p>
|
||||
<p>
|
||||
You can also clone the project with <a href="http://git-scm.com">Git</a>
|
||||
by running:
|
||||
|
||||
<pre>$ git clone git://github.com/majutsushi/tagbar</pre>
|
||||
</p>
|
||||
<div class="footer">
|
||||
get the source code on GitHub : <a href="https://github.com/majutsushi/tagbar">majutsushi/tagbar</a>
|
||||
</div>
|
||||
</div>
|
||||
+1838
File diff suppressed because it is too large
Load Diff
@@ -1,33 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# This script is originally from the YouCompleteMe project.
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
from markdown import markdown
|
||||
import fileinput
|
||||
|
||||
markdown_lines = list(fileinput.input())
|
||||
|
||||
# Delete the header
|
||||
del markdown_lines[:2]
|
||||
|
||||
markdown_source = ''.join(markdown_lines)
|
||||
|
||||
with open('index.html', 'r+') as content_file:
|
||||
content = content_file.read()
|
||||
|
||||
new_contents = markdown(unicode(markdown_source, 'utf-8'),
|
||||
extensions=['fenced_code'])
|
||||
new_tags = BeautifulSoup(new_contents, 'html5lib')
|
||||
|
||||
# soup = BeautifulSoup(content, "html5lib")
|
||||
# Use the normal html parser so it doesn't add html/body tags
|
||||
# around our fragment
|
||||
soup = BeautifulSoup(content, "html.parser")
|
||||
elem = soup.find(id="markdown-output")
|
||||
elem.clear()
|
||||
for new_elem in new_tags.body.contents:
|
||||
elem.append(new_elem)
|
||||
|
||||
content_file.seek(0)
|
||||
content_file.truncate()
|
||||
content_file.write(str(soup))
|
||||
Reference in New Issue
Block a user