mirror of
https://github.com/gryf/tagbar.git
synced 2026-05-10 16:32:58 +02:00
Compare commits
400 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 75174f1c09 | |||
| a81c01c294 | |||
| a5090717dd | |||
| 88bdb86325 | |||
| 3fe9d8e13b | |||
| 5bb0ef3576 | |||
| d7063c7484 | |||
| 56399f446c | |||
| fcabc99ca6 | |||
| a36880be22 | |||
| f1bea00e5b | |||
| e8d127bf40 | |||
| 92752b89ce | |||
| 2a1486447a | |||
| 1e50ea8536 | |||
| 679a9d9ac9 | |||
| 6dafb3dfe8 | |||
| f3b76f9832 | |||
| 175f5053a1 | |||
| d864a44a3d | |||
| db6f884fc7 | |||
| 86ab45aba7 | |||
| 65e014e5a3 | |||
| 2e952fb336 | |||
| bdcdd8d0d7 | |||
| 3bd3ba403d | |||
| c876263e47 | |||
| 3753b235a1 | |||
| 0a8a22e34d | |||
| 524aa93372 | |||
| ccc0d64e59 | |||
| 3c4c8af4b4 | |||
| d1c3f516ea | |||
| ce30e3f0d1 | |||
| a0f51bd5a6 | |||
| ede158656a | |||
| d7f6ec1f8e | |||
| f5a4932ed8 | |||
| c62eaf944b | |||
| dcd5f446c3 | |||
| e718c189e6 | |||
| 7e619b5f1c | |||
| 750b779ca3 | |||
| b607006c56 | |||
| 3c63890ce0 | |||
| 61bee90638 | |||
| 0642b84cd4 | |||
| 4b51aa490e | |||
| cf6eb2d9f7 | |||
| 22f8084a2a | |||
| 10209ffd3f | |||
| e471e57ea6 | |||
| b9e7f0a291 | |||
| 70b691efe1 | |||
| b7766a1693 | |||
| bd810fd1a6 | |||
| a8e050f448 | |||
| 6dfe6afacc | |||
| 3b7d19e0a1 | |||
| a0526a6d5a | |||
| 23f148225b | |||
| 15431176a8 | |||
| 0c943cc1f1 | |||
| 231428ebcd | |||
| 1998a45805 | |||
| 5acba55275 | |||
| 7e53921d4d | |||
| a91422aae3 | |||
| db1b710289 | |||
| 44f114a7cb | |||
| 877515b0d8 | |||
| 42d2750c9a | |||
| 9c60e7f6c6 | |||
| df960e8b9c | |||
| b8065cfee4 | |||
| 387bbadda9 | |||
| c004652797 | |||
| 8d2c44f6ac | |||
| 7f693a0cd4 | |||
| dc155af2fd | |||
| af94c07aea | |||
| c86ab1caa6 | |||
| 2261625e29 | |||
| e330124f6e | |||
| bef1fa4080 | |||
| 72416b1c62 | |||
| ad0e433674 | |||
| fb5b7f61d1 | |||
| a9fc0fc46b | |||
| 2329c95063 | |||
| cfabd89c0f | |||
| 3e417256e8 | |||
| 460f3c8f2e | |||
| d4a08c33e5 | |||
| 7299257d77 | |||
| 937354ebb5 | |||
| 7e4928c056 | |||
| b4643521ff | |||
| 59ea6d656a | |||
| c6c88004c7 | |||
| 817d8a6bee | |||
| c2af2173b5 | |||
| 83246ed59f | |||
| c2ae24e7ab | |||
| 886af9ddc1 | |||
| da87ee9439 | |||
| d4c370cf0e | |||
| 02f8a922b1 | |||
| bbf15b039a | |||
| 6e1f1b8c85 | |||
| 7ffec4539d | |||
| f20edb5a56 | |||
| 877a4a939c | |||
| 8a1bbcb420 | |||
| fef0732394 | |||
| 2abcbf33f0 | |||
| d880bcc333 | |||
| 96275e3921 | |||
| e3732091bf | |||
| b7890e27ca | |||
| f5792732de | |||
| b1c6cbc2d8 | |||
| 41ee79fc0f | |||
| b9e7b51ea5 | |||
| 87a1263f5d | |||
| 959f487981 | |||
| e089b61e25 | |||
| 9d051c1e2d | |||
| aab5f214c5 | |||
| 73cb823d09 | |||
| 68eebbb50c | |||
| 72a7ef378f | |||
| 9ca422ce09 | |||
| 2cc891747b | |||
| ebcf4df686 | |||
| 53e9cb030e | |||
| 1c8feee61f | |||
| 6c60f85938 | |||
| 18b536ce43 | |||
| 51e6e3b66a | |||
| 9f6dce3351 | |||
| 3a4ea1234f | |||
| 5b563a0d2d | |||
| 1374077676 | |||
| 01f57ac564 | |||
| e212be6a12 | |||
| 3d208115fb | |||
| 8bbbb0530e | |||
| 1287f63545 | |||
| d2961a4677 | |||
| 56bee63e17 | |||
| 2d67896b06 | |||
| bcb042da56 | |||
| d16ec1198b | |||
| a1f416edde | |||
| 040e8400af | |||
| b99e103258 | |||
| b6298c0ca0 | |||
| 4d513c8a68 | |||
| 23557ef97a | |||
| 2954e405bb | |||
| 3566907b57 | |||
| a43068e418 | |||
| b6a0ec00cd | |||
| 11cdebab2a | |||
| d81333e055 | |||
| 0bb6499548 | |||
| e4cfe8add5 | |||
| 497e963bc4 | |||
| d1c42db686 | |||
| 321fdd4fd1 | |||
| b1e1063b37 | |||
| 1e5b704e09 | |||
| 7c56066685 | |||
| 7e35a40715 | |||
| 2955f71856 | |||
| d379913b9a | |||
| d61ca60d1c | |||
| 9a75c110b7 | |||
| b7f147aabc | |||
| 61ba5ba578 | |||
| 71e56f5ea4 | |||
| 03592c0112 | |||
| 2438a92cb9 | |||
| d841db9f49 | |||
| 61de1fe0d6 | |||
| 35ee5a91f9 | |||
| f8587f106c | |||
| 7fbd1ad375 | |||
| 931cb37e6b | |||
| 7b36c46d17 | |||
| 91566e6c0b | |||
| d01d7e7546 | |||
| 399b75256a | |||
| 40be9a2e5f | |||
| c6b473f559 | |||
| 8a8e85436d | |||
| 1773059756 | |||
| 3634e7ab4f | |||
| eb392a4502 | |||
| a284cd0091 | |||
| c21176d8da | |||
| 00dfa82b00 | |||
| e62d3444e9 | |||
| 04bb728039 | |||
| fcac7f2936 | |||
| bfc121dc38 | |||
| 4fa15349c5 | |||
| f9c5f24576 | |||
| a084e47eb4 | |||
| df09799372 | |||
| f933907afa | |||
| 5283bc834a | |||
| 5d1ae684a1 | |||
| e1eec86934 | |||
| 5c33e09d68 | |||
| 251c774431 | |||
| 37400d9950 | |||
| 64e935fe58 | |||
| b54d8d64f1 | |||
| 76f16f891b | |||
| 4e5e0ebe59 | |||
| 032fd1fbb3 | |||
| f3a369c31d | |||
| f46ba1a41f | |||
| 9ee516ee6f | |||
| 59c9b7ce1c | |||
| 5e392c1b8d | |||
| ca1c9ee2e2 | |||
| 9bf4fd99e4 | |||
| a9ec78aa5b | |||
| ae46cc025b | |||
| 87d0111bd3 | |||
| 0181f1d0cd | |||
| a5220adc9a | |||
| fabae6a11d | |||
| 2bc6e96ae4 | |||
| 8a139e0576 | |||
| be46ee5988 | |||
| b2c5f0b928 | |||
| 07b7e9b68e | |||
| c251265edf | |||
| fdceb4ea71 | |||
| 614b5b244f | |||
| 3fdefbaa47 | |||
| 368d37ed45 | |||
| 13d4cfcc2c | |||
| 42ce2919a3 | |||
| 836a39af8f | |||
| 0ead3332a9 | |||
| e872e67641 | |||
| b610fb2f5d | |||
| ace45adc51 | |||
| 88d7464079 | |||
| dbc05b24a3 | |||
| 6d8770f949 | |||
| c4963e91cc | |||
| 87bbb46e95 | |||
| b4a5800f72 | |||
| ba3693f977 | |||
| 528bdc6b8d | |||
| 2dcd5260b6 | |||
| 3f28e3b073 | |||
| 915b11bd1c | |||
| e090fe73d1 | |||
| 574376d165 | |||
| 66c56b11a7 | |||
| c57dd9f7a4 | |||
| f3250b2dd1 | |||
| 0377f19d74 | |||
| 2d650b96cf | |||
| 290b71e2b7 | |||
| 78a7eeecf3 | |||
| 207b8520c2 | |||
| 1a2c4ec958 | |||
| 0fd09344c7 | |||
| abffaba655 | |||
| 15f9ad6e88 | |||
| b60d08c468 | |||
| e5408f740f | |||
| 85c198ba57 | |||
| 2e2ba2eab2 | |||
| fd79a17189 | |||
| ae4bbcdaaf | |||
| 3c37ddcc14 | |||
| 5566cb34d5 | |||
| 97d7b04bdd | |||
| 4801c897f8 | |||
| 24efd12f50 | |||
| fec9b2a1ab | |||
| 56cd34830d | |||
| 0b14e28719 | |||
| 225fcaa3ce | |||
| dab8d99fb8 | |||
| a566f7141f | |||
| 7ef2dd0ef1 | |||
| 84d65042fa | |||
| c37d783d4f | |||
| 7ec151a7a9 | |||
| e97d2c00ad | |||
| 57acb383b6 | |||
| 495e5fcb08 | |||
| 746771801c | |||
| 824767bc48 | |||
| 57ee79bd4c | |||
| a217435f50 | |||
| 2bacadf716 | |||
| e4fda667f9 | |||
| 5732ce9bd6 | |||
| f36e0d3d39 | |||
| dacf4f273e | |||
| 82a932406f | |||
| 2ebd2a1392 | |||
| ca02374f40 | |||
| a93fb868d8 | |||
| 070a75cb04 | |||
| 24915dbe24 | |||
| f5435678fb | |||
| 3ecdb5028d | |||
| d0d307c9bd | |||
| f0f9d66465 | |||
| e6e084e8b0 | |||
| cde257b1bc | |||
| 54b28e4988 | |||
| 7c0d8675b5 | |||
| acca348959 | |||
| 1c605bd958 | |||
| 2665695f57 | |||
| 32b5b15b52 | |||
| 87d293206b | |||
| 93f2b68166 | |||
| db9404ca1a | |||
| b6f47e4020 | |||
| ec0eb883dc | |||
| d0df97040b | |||
| dec1f840fb | |||
| 11f8479593 | |||
| 77a318b10e | |||
| c1c7d962af | |||
| aa190a87fa | |||
| 80dfccf09d | |||
| be00efa703 | |||
| cc222f5d8c | |||
| 852c6dac69 | |||
| 0bce914578 | |||
| 59bb2a4355 | |||
| 4ca7a0c636 | |||
| f801147c2e | |||
| 9ec7d1db4c | |||
| 9bbd0098c5 | |||
| 5816ce0c5a | |||
| 3f03aa3013 | |||
| 0224d32eb9 | |||
| 987569e7dd | |||
| a444c62066 | |||
| 1181325968 | |||
| 1f0c0a3a8e | |||
| ad8783961d | |||
| bccdc7a48d | |||
| 2b1f655063 | |||
| 17d199f584 | |||
| feebffcd2a | |||
| 7d836e0c53 | |||
| 0ab07ac566 | |||
| 576d6e6dea | |||
| df341841ec | |||
| 15eddce14f | |||
| e88b81c4f5 | |||
| 19695b87b0 | |||
| 568ef5fd25 | |||
| e635a23cf5 | |||
| 2fee7677d5 | |||
| cd0e20f93b | |||
| ee700817d5 | |||
| 67dc2a3b06 | |||
| 63e689b647 | |||
| ba6eb10e49 | |||
| d39a767486 | |||
| a34acf4f63 | |||
| 6483a0edd1 | |||
| 757358349e | |||
| 04e40e09c1 | |||
| ba7d6b3e8e | |||
| 4569779601 | |||
| 7d1ba97603 | |||
| b1c7f5f792 | |||
| b19c1d8524 | |||
| 8b5ba2ad66 | |||
| 25f43b9e88 | |||
| f6acd740d7 | |||
| bff765b957 | |||
| f2c072dbb9 | |||
| e321d85548 | |||
| f3c1a93017 | |||
| e690a5e97d | |||
| 052bc7972b | |||
| f1c6d8c780 | |||
| 1757b33da7 | |||
| 427d709f61 | |||
| 49d39cae6c |
@@ -0,0 +1,34 @@
|
||||
name: Check
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
vimFlavor: ["vim", "nvim"]
|
||||
tagsProvider: ["exuberant-ctags", "universal-tags"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Install ${{ matrix.tagsProvider }}
|
||||
run: |
|
||||
case ${{ matrix.tagsProvider }} in
|
||||
exuberant-*) sudo apt-get install ctags ;;
|
||||
universal-*) sudo snap install universal-ctags ;;
|
||||
esac
|
||||
- name: Install ${{ matrix.vimFlavor }}
|
||||
if: matrix.vimFlavor == 'nvim'
|
||||
run: |
|
||||
sudo add-apt-repository universe
|
||||
sudo apt-get update
|
||||
sudo apt-get install neovim
|
||||
- name: Review ctags version
|
||||
run: ctags --version
|
||||
- name: Review ${{ matrix.vimFlavor }} version
|
||||
run: ${{ matrix.vimFlavor }} --version
|
||||
- name: "Try tagbar#OpenWindow()"
|
||||
run: |
|
||||
${{ matrix.tagsProvider == 'nvim' && 'nvim -i NONE -u /dev/null --headless' || 'vim -i NONE' }} "+set rtp+=$(pwd)" "+call tagbar#OpenWindow() | q" "+cq" plugin/tagbar.vim
|
||||
@@ -0,0 +1,15 @@
|
||||
name: Vint
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
vint:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Run vint with reviewdog
|
||||
uses: reviewdog/action-vint@v1.0.1
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
reporter: github-pr-review
|
||||
@@ -0,0 +1,5 @@
|
||||
cmdargs:
|
||||
severity: style_problem
|
||||
color: true
|
||||
env:
|
||||
neovim: false
|
||||
@@ -0,0 +1,82 @@
|
||||
TAGBAR LICENSE
|
||||
|
||||
This is the normal Vim license (see ':h license' in Vim) with the necessary
|
||||
replacements for the project and maintainer information.
|
||||
|
||||
I) There are no restrictions on distributing unmodified copies of Tagbar
|
||||
except that they must include this license text. You can also distribute
|
||||
unmodified parts of Tagbar, likewise unrestricted except that they must
|
||||
include this license text. You are also allowed to include executables
|
||||
that you made from the unmodified Tagbar sources, plus your own usage
|
||||
examples and scripts.
|
||||
|
||||
II) It is allowed to distribute a modified (or extended) version of Tagbar,
|
||||
including executables and/or source code, when the following four
|
||||
conditions are met:
|
||||
1) This license text must be included unmodified.
|
||||
2) The modified Tagbar must be distributed in one of the following five ways:
|
||||
a) If you make changes to Tagbar yourself, you must clearly describe in
|
||||
the distribution how to contact you. When the maintainer asks you
|
||||
(in any way) for a copy of the modified Tagbar you distributed, you
|
||||
must make your changes, including source code, available to the
|
||||
maintainer without fee. The maintainer reserves the right to
|
||||
include your changes in the official version of Tagbar. What the
|
||||
maintainer will do with your changes and under what license they
|
||||
will be distributed is negotiable. If there has been no negotiation
|
||||
then this license, or a later version, also applies to your changes.
|
||||
The current maintainer is Jan Larres <jan@majutsushi.net>. If this
|
||||
changes it will be announced in appropriate places (most likely
|
||||
majutsushi.github.io/tagbar and/or github.com/majutsushi/tagbar).
|
||||
When it is completely impossible to contact the maintainer, the
|
||||
obligation to send him your changes ceases. Once the maintainer has
|
||||
confirmed that he has received your changes they will not have to be
|
||||
sent again.
|
||||
b) If you have received a modified Tagbar that was distributed as
|
||||
mentioned under a) you are allowed to further distribute it
|
||||
unmodified, as mentioned at I). If you make additional changes the
|
||||
text under a) applies to those changes.
|
||||
c) Provide all the changes, including source code, with every copy of
|
||||
the modified Tagbar you distribute. This may be done in the form of
|
||||
a context diff. You can choose what license to use for new code you
|
||||
add. The changes and their license must not restrict others from
|
||||
making their own changes to the official version of Tagbar.
|
||||
d) When you have a modified Tagbar which includes changes as mentioned
|
||||
under c), you can distribute it without the source code for the
|
||||
changes if the following three conditions are met:
|
||||
- The license that applies to the changes permits you to distribute
|
||||
the changes to the Tagbar maintainer without fee or restriction, and
|
||||
permits the Tagbar maintainer to include the changes in the official
|
||||
version of Tagbar without fee or restriction.
|
||||
- You keep the changes for at least three years after last
|
||||
distributing the corresponding modified Tagbar. When the
|
||||
maintainer or someone who you distributed the modified Tagbar to
|
||||
asks you (in any way) for the changes within this period, you must
|
||||
make them available to him.
|
||||
- You clearly describe in the distribution how to contact you. This
|
||||
contact information must remain valid for at least three years
|
||||
after last distributing the corresponding modified Tagbar, or as
|
||||
long as possible.
|
||||
e) When the GNU General Public License (GPL) applies to the changes,
|
||||
you can distribute the modified Tagbar under the GNU GPL version 2
|
||||
or any later version.
|
||||
3) A message must be added, at least in the documentation, such that the
|
||||
user of the modified Tagbar is able to see that it was modified. When
|
||||
distributing as mentioned under 2)e) adding the message is only
|
||||
required for as far as this does not conflict with the license used for
|
||||
the changes.
|
||||
4) The contact information as required under 2)a) and 2)d) must not be
|
||||
removed or changed, except that the person himself can make
|
||||
corrections.
|
||||
|
||||
III) If you distribute a modified version of Tagbar, you are encouraged to use
|
||||
the Tagbar license for your changes and make them available to the
|
||||
maintainer, including the source code. The preferred way to do this is
|
||||
by e-mail or by uploading the files to a server and e-mailing the URL. If
|
||||
the number of changes is small (e.g., a modified Makefile) e-mailing a
|
||||
context diff will do. The e-mail address to be used is
|
||||
<jan@majutsushi.net>
|
||||
|
||||
IV) It is not allowed to remove this license from the distribution of the
|
||||
Tagbar sources, parts of it or from a modified version. You may use this
|
||||
license for previous Tagbar releases instead of the license that they
|
||||
came with, at your option.
|
||||
@@ -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.
|
||||
@@ -0,0 +1,97 @@
|
||||
# Tagbar: a class outline viewer for Vim
|
||||
|
||||
[](https://github.com/majutsushi/tagbar/actions?workflow=Vint)
|
||||
[](https://github.com/majutsushi/tagbar/actions?workflow=Check)
|
||||
|
||||
## 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](https://github.com/xolox/vim-easytags).
|
||||
|
||||
## Dependencies
|
||||
|
||||
* [Vim](http://www.vim.org/) >= 7.3.1058
|
||||
or any version of [NeoVim](https://neovim.io/).
|
||||
|
||||
* [Exuberant Ctags](http://ctags.sourceforge.net/) >= 5.5,
|
||||
or (**highly recommended**) any version of [Universal
|
||||
Ctags](https://ctags.io) 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](https://github.com/sergioramos/jsctags),
|
||||
[phpctags](https://github.com/vim-php/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](https://github.com/tpope/vim-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:
|
||||
|
||||
```vim
|
||||
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](https://github.com/majutsushi/tagbar/blob/master/doc/tagbar.txt) using `:help tagbar`.
|
||||
|
||||
## Support for additional filetypes
|
||||
|
||||
For filetypes that are not supported by Exuberant Ctags check out [the
|
||||
wiki](https://github.com/majutsushi/tagbar/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](http://ctags.sourceforge.net/) 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](https://github.com/majutsushi/tagbar/issues?labels=ctags-bug&page=1&state=closed).
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||

|
||||
|
||||
## License
|
||||
|
||||
Tagbar is distributed under the terms of the *Vim license*, see the included [LICENSE](LICENSE) file.
|
||||
|
||||
## Contributors
|
||||
|
||||
Tagbar was originally written by [Jan Larres](https://github.com/majutsushi).
|
||||
It is actively maintained by [Caleb Maclennan](https://github.com/alerque).
|
||||
At least [45 others have contributed](https://github.com/majutsushi/tagbar/graphs/contributors) features and bug fixes over the years.
|
||||
Please document [issues](https://github.com/majutsushi/tagbar/issues) or submit [pull requests](https://github.com/majutsushi/tagbar/issues) on Github.
|
||||
+2356
-2100
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,62 @@
|
||||
function! tagbar#debug#start_debug(...) abort
|
||||
let filename = a:0 > 0 ? a:1 : ''
|
||||
|
||||
if empty(filename)
|
||||
let s:debug_file = 'tagbardebug.log'
|
||||
else
|
||||
let s:debug_file = filename
|
||||
endif
|
||||
|
||||
" Clear log file and start it with version info
|
||||
exe 'redir! > ' . s:debug_file
|
||||
silent version
|
||||
redir END
|
||||
|
||||
" Check whether the log file could be created
|
||||
if !filewritable(s:debug_file)
|
||||
echomsg 'Tagbar: Unable to create log file ' . s:debug_file
|
||||
let s:debug_file = ''
|
||||
return
|
||||
endif
|
||||
|
||||
let s:debug_enabled = 1
|
||||
endfunction
|
||||
|
||||
function! tagbar#debug#stop_debug() abort
|
||||
let s:debug_enabled = 0
|
||||
let s:debug_file = ''
|
||||
endfunction
|
||||
|
||||
function! tagbar#debug#log(msg) abort
|
||||
if s:debug_enabled
|
||||
execute 'redir >> ' . s:debug_file
|
||||
silent echon s:gettime() . ': ' . a:msg . "\n"
|
||||
redir END
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! tagbar#debug#log_ctags_output(output) abort
|
||||
if s:debug_enabled
|
||||
exe 'redir! > ' . s:debug_file . '.ctags_out'
|
||||
silent echon a:output
|
||||
redir END
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! tagbar#debug#enabled() abort
|
||||
return s:debug_enabled
|
||||
endfunction
|
||||
|
||||
if has('reltime')
|
||||
function! s:gettime() abort
|
||||
let time = split(reltimestr(reltime()), '\.')
|
||||
return strftime('%Y-%m-%d %H:%M:%S.', time[0]) . time[1]
|
||||
endfunction
|
||||
else
|
||||
function! s:gettime() abort
|
||||
return strftime('%Y-%m-%d %H:%M:%S')
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:debug_enabled = 0
|
||||
let s:debug_file = ''
|
||||
@@ -0,0 +1,237 @@
|
||||
let s:visibility_symbols = {
|
||||
\ 'public' : '+',
|
||||
\ 'protected' : '#',
|
||||
\ 'private' : '-'
|
||||
\ }
|
||||
|
||||
function! tagbar#prototypes#basetag#new(name) abort
|
||||
let newobj = {}
|
||||
|
||||
let newobj.name = a:name
|
||||
let newobj.fields = {}
|
||||
let newobj.fields.line = 0
|
||||
let newobj.fields.column = 0
|
||||
let newobj.prototype = ''
|
||||
let newobj.path = ''
|
||||
let newobj.fullpath = a:name
|
||||
let newobj.depth = 0
|
||||
let newobj.parent = {}
|
||||
let newobj.tline = -1
|
||||
let newobj.fileinfo = {}
|
||||
let newobj.typeinfo = {}
|
||||
let newobj._childlist = []
|
||||
let newobj._childdict = {}
|
||||
|
||||
let newobj.isNormalTag = function(s:add_snr('s:isNormalTag'))
|
||||
let newobj.isPseudoTag = function(s:add_snr('s:isPseudoTag'))
|
||||
let newobj.isSplitTag = function(s:add_snr('s:isSplitTag'))
|
||||
let newobj.isKindheader = function(s:add_snr('s:isKindheader'))
|
||||
let newobj.getPrototype = function(s:add_snr('s:getPrototype'))
|
||||
let newobj._getPrefix = function(s:add_snr('s:_getPrefix'))
|
||||
let newobj.initFoldState = function(s:add_snr('s:initFoldState'))
|
||||
let newobj.getClosedParentTline = function(s:add_snr('s:getClosedParentTline'))
|
||||
let newobj.isFoldable = function(s:add_snr('s:isFoldable'))
|
||||
let newobj.isFolded = function(s:add_snr('s:isFolded'))
|
||||
let newobj.openFold = function(s:add_snr('s:openFold'))
|
||||
let newobj.closeFold = function(s:add_snr('s:closeFold'))
|
||||
let newobj.setFolded = function(s:add_snr('s:setFolded'))
|
||||
let newobj.openParents = function(s:add_snr('s:openParents'))
|
||||
let newobj.addChild = function(s:add_snr('s:addChild'))
|
||||
let newobj.getChildren = function(s:add_snr('s:getChildren'))
|
||||
let newobj.getChildrenByName = function(s:add_snr('s:getChildrenByName'))
|
||||
let newobj.removeChild = function(s:add_snr('s:removeChild'))
|
||||
|
||||
return newobj
|
||||
endfunction
|
||||
|
||||
" s:isNormalTag() {{{1
|
||||
function! s:isNormalTag() abort dict
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
" s:isPseudoTag() {{{1
|
||||
function! s:isPseudoTag() abort dict
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
" s:isSplitTag {{{1
|
||||
function! s:isSplitTag() abort dict
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
" s:isKindheader() {{{1
|
||||
function! s:isKindheader() abort dict
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
" s:getPrototype() {{{1
|
||||
function! s:getPrototype(short) abort dict
|
||||
return self.prototype
|
||||
endfunction
|
||||
|
||||
" s:_getPrefix() {{{1
|
||||
function! s:_getPrefix() abort dict
|
||||
let fileinfo = self.fileinfo
|
||||
|
||||
if !empty(self._childlist)
|
||||
if fileinfo.tagfolds[self.fields.kind][self.fullpath]
|
||||
let prefix = g:tagbar#icon_closed
|
||||
else
|
||||
let prefix = g:tagbar#icon_open
|
||||
endif
|
||||
else
|
||||
let prefix = ' '
|
||||
endif
|
||||
" Visibility is called 'access' in the ctags output
|
||||
if g:tagbar_show_visibility
|
||||
if has_key(self.fields, 'access')
|
||||
let prefix .= get(s:visibility_symbols, self.fields.access, ' ')
|
||||
elseif has_key(self.fields, 'file')
|
||||
let prefix .= s:visibility_symbols.private
|
||||
else
|
||||
let prefix .= ' '
|
||||
endif
|
||||
endif
|
||||
|
||||
return prefix
|
||||
endfunction
|
||||
|
||||
" s:initFoldState() {{{1
|
||||
function! s:initFoldState(known_files) abort dict
|
||||
let fileinfo = self.fileinfo
|
||||
|
||||
if a:known_files.has(fileinfo.fpath) &&
|
||||
\ has_key(fileinfo, '_tagfolds_old') &&
|
||||
\ has_key(fileinfo._tagfolds_old[self.fields.kind], self.fullpath)
|
||||
" The file has been updated and the tag was there before, so copy its
|
||||
" old fold state
|
||||
let fileinfo.tagfolds[self.fields.kind][self.fullpath] =
|
||||
\ fileinfo._tagfolds_old[self.fields.kind][self.fullpath]
|
||||
elseif self.depth >= fileinfo.foldlevel
|
||||
let fileinfo.tagfolds[self.fields.kind][self.fullpath] = 1
|
||||
else
|
||||
let fileinfo.tagfolds[self.fields.kind][self.fullpath] =
|
||||
\ fileinfo.kindfolds[self.fields.kind]
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:getClosedParentTline() {{{1
|
||||
function! s:getClosedParentTline() abort dict
|
||||
let tagline = self.tline
|
||||
|
||||
" Find the first closed parent, starting from the top of the hierarchy.
|
||||
let parents = []
|
||||
let curparent = self.parent
|
||||
while !empty(curparent)
|
||||
call add(parents, curparent)
|
||||
let curparent = curparent.parent
|
||||
endwhile
|
||||
for parent in reverse(parents)
|
||||
if parent.isFolded()
|
||||
let tagline = parent.tline
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
|
||||
return tagline
|
||||
endfunction
|
||||
|
||||
" s:isFoldable() {{{1
|
||||
function! s:isFoldable() abort dict
|
||||
return !empty(self._childlist)
|
||||
endfunction
|
||||
|
||||
" s:isFolded() {{{1
|
||||
function! s:isFolded() abort dict
|
||||
return self.fileinfo.tagfolds[self.fields.kind][self.fullpath]
|
||||
endfunction
|
||||
|
||||
" s:openFold() {{{1
|
||||
function! s:openFold() abort dict
|
||||
if self.isFoldable()
|
||||
let self.fileinfo.tagfolds[self.fields.kind][self.fullpath] = 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:closeFold() {{{1
|
||||
function! s:closeFold() abort dict
|
||||
let newline = line('.')
|
||||
|
||||
if !empty(self.parent) && self.parent.isKindheader()
|
||||
" Tag is child of generic 'kind'
|
||||
call self.parent.closeFold()
|
||||
let newline = self.parent.tline
|
||||
elseif self.isFoldable() && !self.isFolded()
|
||||
" Tag is parent of a scope and is not folded
|
||||
let self.fileinfo.tagfolds[self.fields.kind][self.fullpath] = 1
|
||||
let newline = self.tline
|
||||
elseif !empty(self.parent)
|
||||
" Tag is normal child, so close parent
|
||||
let parent = self.parent
|
||||
let self.fileinfo.tagfolds[parent.fields.kind][parent.fullpath] = 1
|
||||
let newline = parent.tline
|
||||
endif
|
||||
|
||||
return newline
|
||||
endfunction
|
||||
|
||||
" s:setFolded() {{{1
|
||||
function! s:setFolded(folded) abort dict
|
||||
let self.fileinfo.tagfolds[self.fields.kind][self.fullpath] = a:folded
|
||||
endfunction
|
||||
|
||||
" s:openParents() {{{1
|
||||
function! s:openParents() abort dict
|
||||
let parent = self.parent
|
||||
|
||||
while !empty(parent)
|
||||
call parent.openFold()
|
||||
let parent = parent.parent
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
" s:addChild() {{{1
|
||||
function! s:addChild(tag) abort dict
|
||||
call add(self._childlist, a:tag)
|
||||
|
||||
if has_key(self._childdict, a:tag.name)
|
||||
call add(self._childdict[a:tag.name], a:tag)
|
||||
else
|
||||
let self._childdict[a:tag.name] = [a:tag]
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:getChildren() {{{1
|
||||
function! s:getChildren() dict abort
|
||||
return self._childlist
|
||||
endfunction
|
||||
|
||||
" s:getChildrenByName() {{{1
|
||||
function! s:getChildrenByName(tagname) dict abort
|
||||
return get(self._childdict, a:tagname, [])
|
||||
endfunction
|
||||
|
||||
" s:removeChild() {{{1
|
||||
function! s:removeChild(tag) dict abort
|
||||
let idx = index(self._childlist, a:tag)
|
||||
if idx >= 0
|
||||
call remove(self._childlist, idx)
|
||||
endif
|
||||
|
||||
let namelist = get(self._childdict, a:tag.name, [])
|
||||
let idx = index(namelist, a:tag)
|
||||
if idx >= 0
|
||||
call remove(namelist, idx)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:add_snr() {{{1
|
||||
function! s:add_snr(funcname) abort
|
||||
if !exists('s:snr')
|
||||
let s:snr = matchstr(expand('<sfile>'), '<SNR>\d\+_\zeget_snr$')
|
||||
endif
|
||||
return s:snr . a:funcname
|
||||
endfunction
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
@@ -0,0 +1,146 @@
|
||||
function! tagbar#prototypes#fileinfo#new(fname, ftype, typeinfo) abort
|
||||
let newobj = {}
|
||||
|
||||
" The complete file path
|
||||
let newobj.fpath = a:fname
|
||||
|
||||
let newobj.bufnr = bufnr(a:fname)
|
||||
|
||||
" File modification time
|
||||
let newobj.mtime = getftime(a:fname)
|
||||
|
||||
" The vim file type
|
||||
let newobj.ftype = a:ftype
|
||||
|
||||
" List of the tags that are present in the file, sorted according to the
|
||||
" value of 'g:tagbar_sort'
|
||||
let newobj._taglist = []
|
||||
let newobj._tagdict = {}
|
||||
|
||||
" Dictionary of the tags, indexed by line number in the file
|
||||
let newobj.fline = {}
|
||||
|
||||
" Dictionary of the tags, indexed by line number in the tagbar
|
||||
let newobj.tline = {}
|
||||
|
||||
" Dictionary of the folding state of 'kind's, indexed by short name
|
||||
let newobj.kindfolds = {}
|
||||
let newobj.typeinfo = a:typeinfo
|
||||
" copy the default fold state from the type info
|
||||
for kind in a:typeinfo.kinds
|
||||
let newobj.kindfolds[kind.short] =
|
||||
\ g:tagbar_foldlevel == 0 ? 1 : kind.fold
|
||||
endfor
|
||||
|
||||
" Dictionary of dictionaries of the folding state of individual tags,
|
||||
" indexed by kind and full path
|
||||
let newobj.tagfolds = {}
|
||||
for kind in a:typeinfo.kinds
|
||||
let newobj.tagfolds[kind.short] = {}
|
||||
endfor
|
||||
|
||||
" The current foldlevel of the file
|
||||
let newobj.foldlevel = g:tagbar_foldlevel
|
||||
|
||||
let newobj.addTag = function(s:add_snr('s:addTag'))
|
||||
let newobj.getTags = function(s:add_snr('s:getTags'))
|
||||
let newobj.getTagsByName = function(s:add_snr('s:getTagsByName'))
|
||||
let newobj.removeTag = function(s:add_snr('s:removeTag'))
|
||||
let newobj.reset = function(s:add_snr('s:reset'))
|
||||
let newobj.clearOldFolds = function(s:add_snr('s:clearOldFolds'))
|
||||
let newobj.sortTags = function(s:add_snr('s:sortTags'))
|
||||
let newobj.openKindFold = function(s:add_snr('s:openKindFold'))
|
||||
let newobj.closeKindFold = function(s:add_snr('s:closeKindFold'))
|
||||
|
||||
return newobj
|
||||
endfunction
|
||||
|
||||
" s:addTag() {{{1
|
||||
function! s:addTag(tag) abort dict
|
||||
call add(self._taglist, a:tag)
|
||||
|
||||
if has_key(self._tagdict, a:tag.name)
|
||||
call add(self._tagdict[a:tag.name], a:tag)
|
||||
else
|
||||
let self._tagdict[a:tag.name] = [a:tag]
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:getTags() {{{1
|
||||
function! s:getTags() dict abort
|
||||
return self._taglist
|
||||
endfunction
|
||||
|
||||
" s:getTagsByName() {{{1
|
||||
function! s:getTagsByName(tagname) dict abort
|
||||
return get(self._tagdict, a:tagname, [])
|
||||
endfunction
|
||||
|
||||
" s:removeTag() {{{1
|
||||
function! s:removeTag(tag) dict abort
|
||||
let idx = index(self._taglist, a:tag)
|
||||
if idx >= 0
|
||||
call remove(self._taglist, idx)
|
||||
endif
|
||||
|
||||
let namelist = get(self._tagdict, a:tag.name, [])
|
||||
let idx = index(namelist, a:tag)
|
||||
if idx >= 0
|
||||
call remove(namelist, idx)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:reset() {{{1
|
||||
" Reset stuff that gets regenerated while processing a file and save the old
|
||||
" tag folds
|
||||
function! s:reset() abort dict
|
||||
let self.mtime = getftime(self.fpath)
|
||||
let self._taglist = []
|
||||
let self._tagdict = {}
|
||||
let self.fline = {}
|
||||
let self.tline = {}
|
||||
|
||||
let self._tagfolds_old = self.tagfolds
|
||||
let self.tagfolds = {}
|
||||
|
||||
for kind in self.typeinfo.kinds
|
||||
let self.tagfolds[kind.short] = {}
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
" s:clearOldFolds() {{{1
|
||||
function! s:clearOldFolds() abort dict
|
||||
if exists('self._tagfolds_old')
|
||||
unlet self._tagfolds_old
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:sortTags() {{{1
|
||||
function! s:sortTags(compare_typeinfo) abort dict
|
||||
if get(a:compare_typeinfo, 'sort', g:tagbar_sort)
|
||||
call tagbar#sorting#sort(self._taglist, 'kind', a:compare_typeinfo)
|
||||
else
|
||||
call tagbar#sorting#sort(self._taglist, 'line', a:compare_typeinfo)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:openKindFold() {{{1
|
||||
function! s:openKindFold(kind) abort dict
|
||||
let self.kindfolds[a:kind.short] = 0
|
||||
endfunction
|
||||
|
||||
" s:closeKindFold() {{{1
|
||||
function! s:closeKindFold(kind) abort dict
|
||||
let self.kindfolds[a:kind.short] = 1
|
||||
endfunction
|
||||
|
||||
" s:add_snr() {{{1
|
||||
function! s:add_snr(funcname) abort
|
||||
if !exists('s:snr')
|
||||
let s:snr = matchstr(expand('<sfile>'), '<SNR>\d\+_\zeget_snr$')
|
||||
endif
|
||||
return s:snr . a:funcname
|
||||
endfunction
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
@@ -0,0 +1,61 @@
|
||||
function! tagbar#prototypes#kindheadertag#new(name) abort
|
||||
let newobj = tagbar#prototypes#basetag#new(a:name)
|
||||
|
||||
let newobj.isKindheader = function(s:add_snr('s:isKindheader'))
|
||||
let newobj.getPrototype = function(s:add_snr('s:getPrototype'))
|
||||
let newobj.isFoldable = function(s:add_snr('s:isFoldable'))
|
||||
let newobj.isFolded = function(s:add_snr('s:isFolded'))
|
||||
let newobj.openFold = function(s:add_snr('s:openFold'))
|
||||
let newobj.closeFold = function(s:add_snr('s:closeFold'))
|
||||
let newobj.toggleFold = function(s:add_snr('s:toggleFold'))
|
||||
|
||||
return newobj
|
||||
endfunction
|
||||
|
||||
" s:isKindheader() {{{1
|
||||
function! s:isKindheader() abort dict
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
" s:getPrototype() {{{1
|
||||
function! s:getPrototype(short) abort dict
|
||||
return self.name . ': ' .
|
||||
\ self.numtags . ' ' . (self.numtags > 1 ? 'tags' : 'tag')
|
||||
endfunction
|
||||
|
||||
" s:isFoldable() {{{1
|
||||
function! s:isFoldable() abort dict
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
" s:isFolded() {{{1
|
||||
function! s:isFolded() abort dict
|
||||
return self.fileinfo.kindfolds[self.short]
|
||||
endfunction
|
||||
|
||||
" s:openFold() {{{1
|
||||
function! s:openFold() abort dict
|
||||
let self.fileinfo.kindfolds[self.short] = 0
|
||||
endfunction
|
||||
|
||||
" s:closeFold() {{{1
|
||||
function! s:closeFold() abort dict
|
||||
let self.fileinfo.kindfolds[self.short] = 1
|
||||
return line('.')
|
||||
endfunction
|
||||
|
||||
" s:toggleFold() {{{1
|
||||
function! s:toggleFold(fileinfo) abort dict
|
||||
let a:fileinfo.kindfolds[self.short] = !a:fileinfo.kindfolds[self.short]
|
||||
endfunction
|
||||
|
||||
" s:add_snr() {{{1
|
||||
function! s:add_snr(funcname) abort
|
||||
if !exists('s:snr')
|
||||
let s:snr = matchstr(expand('<sfile>'), '<SNR>\d\+_\zeget_snr$')
|
||||
endif
|
||||
return s:snr . a:funcname
|
||||
endfunction
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
@@ -0,0 +1,119 @@
|
||||
function! tagbar#prototypes#normaltag#new(name) abort
|
||||
let newobj = tagbar#prototypes#basetag#new(a:name)
|
||||
|
||||
let newobj.isNormalTag = function(s:add_snr('s:isNormalTag'))
|
||||
let newobj.strfmt = function(s:add_snr('s:strfmt'))
|
||||
let newobj.str = function(s:add_snr('s:str'))
|
||||
let newobj.getPrototype = function(s:add_snr('s:getPrototype'))
|
||||
|
||||
return newobj
|
||||
endfunction
|
||||
|
||||
" s:isNormalTag() {{{1
|
||||
function! s:isNormalTag() abort dict
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
" s:strfmt() {{{1
|
||||
function! s:strfmt() abort dict
|
||||
let typeinfo = self.typeinfo
|
||||
|
||||
let suffix = get(self.fields, 'signature', '')
|
||||
if has_key(self.fields, 'type')
|
||||
let suffix .= ' : ' . self.fields.type
|
||||
elseif has_key(get(typeinfo, 'kind2scope', {}), self.fields.kind)
|
||||
let suffix .= ' : ' . typeinfo.kind2scope[self.fields.kind]
|
||||
endif
|
||||
|
||||
return self._getPrefix() . self.name . suffix
|
||||
endfunction
|
||||
|
||||
" s:str() {{{1
|
||||
function! s:str(longsig, full) abort dict
|
||||
if a:full && self.path !=# ''
|
||||
let str = self.path . self.typeinfo.sro . self.name
|
||||
else
|
||||
let str = self.name
|
||||
endif
|
||||
|
||||
if has_key(self.fields, 'signature')
|
||||
if a:longsig
|
||||
let str .= self.fields.signature
|
||||
else
|
||||
let str .= '()'
|
||||
endif
|
||||
endif
|
||||
|
||||
return str
|
||||
endfunction
|
||||
|
||||
" s:getPrototype() {{{1
|
||||
function! s:getPrototype(short) abort dict
|
||||
if self.prototype !=# ''
|
||||
let prototype = self.prototype
|
||||
else
|
||||
let bufnr = self.fileinfo.bufnr
|
||||
|
||||
if self.fields.line == 0 || !bufloaded(bufnr)
|
||||
" No linenumber available or buffer not loaded (probably due to
|
||||
" 'nohidden'), try the pattern instead
|
||||
return substitute(self.pattern, '^\\M\\^\\C\s*\(.*\)\\$$', '\1', '')
|
||||
endif
|
||||
|
||||
let line = getbufline(bufnr, self.fields.line)[0]
|
||||
let list = split(line, '\zs')
|
||||
|
||||
let start = index(list, '(')
|
||||
if start == -1
|
||||
return substitute(line, '^\s\+', '', '')
|
||||
endif
|
||||
|
||||
let opening = count(list, '(', 0, start)
|
||||
let closing = count(list, ')', 0, start)
|
||||
if closing >= opening
|
||||
return substitute(line, '^\s\+', '', '')
|
||||
endif
|
||||
|
||||
let balance = opening - closing
|
||||
|
||||
let prototype = line
|
||||
let curlinenr = self.fields.line + 1
|
||||
while balance > 0
|
||||
let curline = getbufline(bufnr, curlinenr)[0]
|
||||
let curlist = split(curline, '\zs')
|
||||
let balance += count(curlist, '(')
|
||||
let balance -= count(curlist, ')')
|
||||
let prototype .= "\n" . curline
|
||||
let curlinenr += 1
|
||||
endwhile
|
||||
|
||||
let self.prototype = prototype
|
||||
endif
|
||||
|
||||
if a:short
|
||||
" join all lines and remove superfluous spaces
|
||||
let prototype = substitute(prototype, '^\s\+', '', '')
|
||||
let prototype = substitute(prototype, '\_s\+', ' ', 'g')
|
||||
let prototype = substitute(prototype, '(\s\+', '(', 'g')
|
||||
let prototype = substitute(prototype, '\s\+)', ')', 'g')
|
||||
" Avoid hit-enter prompts
|
||||
let maxlen = &columns - 12
|
||||
if len(prototype) > maxlen
|
||||
let prototype = prototype[:maxlen - 1 - 3]
|
||||
let prototype .= '...'
|
||||
endif
|
||||
endif
|
||||
|
||||
return prototype
|
||||
endfunction
|
||||
|
||||
" s:add_snr() {{{1
|
||||
function! s:add_snr(funcname) abort
|
||||
if !exists('s:snr')
|
||||
let s:snr = matchstr(expand('<sfile>'), '<SNR>\d\+_\zeget_snr$')
|
||||
endif
|
||||
return s:snr . a:funcname
|
||||
endfunction
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
@@ -0,0 +1,36 @@
|
||||
function! tagbar#prototypes#pseudotag#new(name) abort
|
||||
let newobj = tagbar#prototypes#basetag#new(a:name)
|
||||
|
||||
let newobj.isPseudoTag = function(s:add_snr('s:isPseudoTag'))
|
||||
let newobj.strfmt = function(s:add_snr('s:strfmt'))
|
||||
|
||||
return newobj
|
||||
endfunction
|
||||
|
||||
" s:isPseudoTag() {{{1
|
||||
function! s:isPseudoTag() abort dict
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
" s:strfmt() {{{1
|
||||
function! s:strfmt() abort dict
|
||||
let typeinfo = self.typeinfo
|
||||
|
||||
let suffix = get(self.fields, 'signature', '')
|
||||
if has_key(typeinfo.kind2scope, self.fields.kind)
|
||||
let suffix .= ' : ' . typeinfo.kind2scope[self.fields.kind]
|
||||
endif
|
||||
|
||||
return self._getPrefix() . self.name . '*' . suffix
|
||||
endfunction
|
||||
|
||||
" s:add_snr() {{{1
|
||||
function! s:add_snr(funcname) abort
|
||||
if !exists('s:snr')
|
||||
let s:snr = matchstr(expand('<sfile>'), '<SNR>\d\+_\zeget_snr$')
|
||||
endif
|
||||
return s:snr . a:funcname
|
||||
endfunction
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
@@ -0,0 +1,26 @@
|
||||
" A tag that was created because of a tag name that covers multiple scopes
|
||||
" Inherits the fields of the "main" tag it was split from.
|
||||
" May be replaced during tag processing if it appears as a normal tag later,
|
||||
" just like a pseudo tag.
|
||||
|
||||
function! tagbar#prototypes#splittag#new(name) abort
|
||||
let newobj = tagbar#prototypes#normaltag#new(a:name)
|
||||
|
||||
let newobj.isSplitTag = function(s:add_snr('s:isSplitTag'))
|
||||
|
||||
return newobj
|
||||
endfunction
|
||||
|
||||
function! s:isSplitTag() abort dict
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
function! s:add_snr(funcname) abort
|
||||
if !exists('s:snr')
|
||||
let s:snr = matchstr(expand('<sfile>'), '<SNR>\d\+_\zeget_snr$')
|
||||
endif
|
||||
return s:snr . a:funcname
|
||||
endfunction
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
@@ -0,0 +1,42 @@
|
||||
function! tagbar#prototypes#typeinfo#new(...) abort
|
||||
let newobj = {}
|
||||
|
||||
let newobj.kinddict = {}
|
||||
|
||||
if a:0 > 0
|
||||
call extend(newobj, a:1)
|
||||
endif
|
||||
|
||||
let newobj.getKind = function(s:add_snr('s:getKind'))
|
||||
let newobj.createKinddict = function(s:add_snr('s:createKinddict'))
|
||||
|
||||
return newobj
|
||||
endfunction
|
||||
|
||||
" s:getKind() {{{1
|
||||
function! s:getKind(kind) abort dict
|
||||
let idx = self.kinddict[a:kind]
|
||||
return self.kinds[idx]
|
||||
endfunction
|
||||
|
||||
" s:createKinddict() {{{1
|
||||
" Create a dictionary of the kind order for fast access in sorting functions
|
||||
function! s:createKinddict() abort dict
|
||||
let i = 0
|
||||
for kind in self.kinds
|
||||
let self.kinddict[kind.short] = i
|
||||
let i += 1
|
||||
endfor
|
||||
let self.kinddict['?'] = i
|
||||
endfunction
|
||||
|
||||
" s:add_snr() {{{1
|
||||
function! s:add_snr(funcname) abort
|
||||
if !exists('s:snr')
|
||||
let s:snr = matchstr(expand('<sfile>'), '<SNR>\d\+_\zeget_snr$')
|
||||
endif
|
||||
return s:snr . a:funcname
|
||||
endfunction
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
@@ -0,0 +1,57 @@
|
||||
" Script-local variable needed since compare functions can't
|
||||
" take additional arguments
|
||||
let s:compare_typeinfo = {}
|
||||
|
||||
function! tagbar#sorting#sort(tags, compareby, compare_typeinfo) abort
|
||||
let s:compare_typeinfo = a:compare_typeinfo
|
||||
|
||||
let comparemethod =
|
||||
\ a:compareby ==# 'kind' ? 's:compare_by_kind' : 's:compare_by_line'
|
||||
|
||||
call sort(a:tags, comparemethod)
|
||||
|
||||
for tag in a:tags
|
||||
if !empty(tag.getChildren())
|
||||
call tagbar#sorting#sort(tag.getChildren(), a:compareby,
|
||||
\ a:compare_typeinfo)
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! s:compare_by_kind(tag1, tag2) abort
|
||||
let typeinfo = s:compare_typeinfo
|
||||
|
||||
if typeinfo.kinddict[a:tag1.fields.kind] <#
|
||||
\ typeinfo.kinddict[a:tag2.fields.kind]
|
||||
return -1
|
||||
elseif typeinfo.kinddict[a:tag1.fields.kind] >#
|
||||
\ typeinfo.kinddict[a:tag2.fields.kind]
|
||||
return 1
|
||||
else
|
||||
" Ignore '~' prefix for C++ destructors to sort them directly under
|
||||
" the constructors
|
||||
if a:tag1.name[0] ==# '~'
|
||||
let name1 = a:tag1.name[1:]
|
||||
else
|
||||
let name1 = a:tag1.name
|
||||
endif
|
||||
if a:tag2.name[0] ==# '~'
|
||||
let name2 = a:tag2.name[1:]
|
||||
else
|
||||
let name2 = a:tag2.name
|
||||
endif
|
||||
|
||||
let ci = g:tagbar_case_insensitive
|
||||
if (((!ci) && (name1 <=# name2)) || (ci && (name1 <=? name2)))
|
||||
return -1
|
||||
else
|
||||
return 1
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:compare_by_line(tag1, tag2) abort
|
||||
return a:tag1.fields.line - a:tag2.fields.line
|
||||
endfunction
|
||||
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
@@ -0,0 +1,51 @@
|
||||
function! tagbar#state#get_current_file(force_current) abort
|
||||
return s:get().getCurrent(a:force_current)
|
||||
endfunction
|
||||
|
||||
function! tagbar#state#set_current_file(fileinfo) abort
|
||||
call s:get().setCurrentFile(a:fileinfo)
|
||||
endfunction
|
||||
|
||||
function! tagbar#state#set_paused() abort
|
||||
call s:get().setPaused()
|
||||
endfunction
|
||||
|
||||
function! s:get() abort
|
||||
if !exists('t:tagbar_state')
|
||||
let t:tagbar_state = s:State.New()
|
||||
endif
|
||||
|
||||
return t:tagbar_state
|
||||
endfunction
|
||||
|
||||
let s:State = {
|
||||
\ '_current' : {},
|
||||
\ '_paused' : {},
|
||||
\ }
|
||||
|
||||
" s:state.New() {{{1
|
||||
function! s:State.New() abort dict
|
||||
return deepcopy(self)
|
||||
endfunction
|
||||
|
||||
" s:state.getCurrent() {{{1
|
||||
function! s:State.getCurrent(force_current) abort dict
|
||||
if !tagbar#is_paused() || a:force_current
|
||||
return self._current
|
||||
else
|
||||
return self._paused
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:state.setCurrentFile() {{{1
|
||||
function! s:State.setCurrentFile(fileinfo) abort dict
|
||||
let self._current = a:fileinfo
|
||||
endfunction
|
||||
|
||||
" s:state.setPaused() {{{1
|
||||
function! s:State.setPaused() abort dict
|
||||
let self._paused = self._current
|
||||
endfunction
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
@@ -0,0 +1,773 @@
|
||||
" Type definitions for standard Exuberant Ctags
|
||||
|
||||
function! tagbar#types#ctags#init(supported_types) abort
|
||||
let types = {}
|
||||
|
||||
" Ant {{{1
|
||||
let type_ant = tagbar#prototypes#typeinfo#new()
|
||||
let type_ant.ctagstype = 'ant'
|
||||
let type_ant.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'projects', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'targets', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.ant = type_ant
|
||||
" Asm {{{1
|
||||
let type_asm = tagbar#prototypes#typeinfo#new()
|
||||
let type_asm.ctagstype = 'asm'
|
||||
let type_asm.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'macros', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'defines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.asm = type_asm
|
||||
" ASP {{{1
|
||||
let type_aspvbs = tagbar#prototypes#typeinfo#new()
|
||||
let type_aspvbs.ctagstype = 'asp'
|
||||
let type_aspvbs.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'constants', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.aspvbs = type_aspvbs
|
||||
" Asymptote {{{1
|
||||
" Asymptote gets parsed well using filetype = c
|
||||
let type_asy = tagbar#prototypes#typeinfo#new()
|
||||
let type_asy.ctagstype = 'c'
|
||||
let type_asy.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_asy.sro = '::'
|
||||
let type_asy.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_asy.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let types.asy = type_asy
|
||||
" Awk {{{1
|
||||
let type_awk = tagbar#prototypes#typeinfo#new()
|
||||
let type_awk.ctagstype = 'awk'
|
||||
let type_awk.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.awk = type_awk
|
||||
" Basic {{{1
|
||||
let type_basic = tagbar#prototypes#typeinfo#new()
|
||||
let type_basic.ctagstype = 'basic'
|
||||
let type_basic.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'enumerations', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.basic = type_basic
|
||||
" BETA {{{1
|
||||
let type_beta = tagbar#prototypes#typeinfo#new()
|
||||
let type_beta.ctagstype = 'beta'
|
||||
let type_beta.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'fragments', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'slots', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'patterns', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.beta = type_beta
|
||||
" C {{{1
|
||||
let type_c = tagbar#prototypes#typeinfo#new()
|
||||
let type_c.ctagstype = 'c'
|
||||
let type_c.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_c.sro = '::'
|
||||
let type_c.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_c.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let types.c = type_c
|
||||
" C++ {{{1
|
||||
let type_cpp = tagbar#prototypes#typeinfo#new()
|
||||
let type_cpp.ctagstype = 'c++'
|
||||
let type_cpp.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_cpp.sro = '::'
|
||||
let type_cpp.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'n' : 'namespace',
|
||||
\ 'c' : 'class',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_cpp.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'namespace' : 'n',
|
||||
\ 'class' : 'c',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let types.cpp = type_cpp
|
||||
let types.cuda = type_cpp
|
||||
" C# {{{1
|
||||
let type_cs = tagbar#prototypes#typeinfo#new()
|
||||
let type_cs.ctagstype = 'c#'
|
||||
let type_cs.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'E', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_cs.sro = '.'
|
||||
let type_cs.kind2scope = {
|
||||
\ 'n' : 'namespace',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class',
|
||||
\ 's' : 'struct',
|
||||
\ 'g' : 'enum'
|
||||
\ }
|
||||
let type_cs.scope2kind = {
|
||||
\ 'namespace' : 'n',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c',
|
||||
\ 'struct' : 's',
|
||||
\ 'enum' : 'g'
|
||||
\ }
|
||||
let types.cs = type_cs
|
||||
" COBOL {{{1
|
||||
let type_cobol = tagbar#prototypes#typeinfo#new()
|
||||
let type_cobol.ctagstype = 'cobol'
|
||||
let type_cobol.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'data items', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'file descriptions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'group items', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'paragraphs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'P', 'long' : 'program ids', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.cobol = type_cobol
|
||||
" DOS Batch {{{1
|
||||
let type_dosbatch = tagbar#prototypes#typeinfo#new()
|
||||
let type_dosbatch.ctagstype = 'dosbatch'
|
||||
let type_dosbatch.kinds = [
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.dosbatch = type_dosbatch
|
||||
" Eiffel {{{1
|
||||
let type_eiffel = tagbar#prototypes#typeinfo#new()
|
||||
let type_eiffel.ctagstype = 'eiffel'
|
||||
let type_eiffel.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'features', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_eiffel.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_eiffel.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'feature'
|
||||
\ }
|
||||
let type_eiffel.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'feature' : 'f'
|
||||
\ }
|
||||
let types.eiffel = type_eiffel
|
||||
" Erlang {{{1
|
||||
let type_erlang = tagbar#prototypes#typeinfo#new()
|
||||
let type_erlang.ctagstype = 'erlang'
|
||||
let type_erlang.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'macro definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'record definitions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_erlang.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_erlang.kind2scope = {
|
||||
\ 'm' : 'module'
|
||||
\ }
|
||||
let type_erlang.scope2kind = {
|
||||
\ 'module' : 'm'
|
||||
\ }
|
||||
let types.erlang = type_erlang
|
||||
" Flex {{{1
|
||||
" Vim doesn't support Flex out of the box, this is based on rough
|
||||
" guesses and probably requires
|
||||
" http://www.vim.org/scripts/script.php?script_id=2909
|
||||
" Improvements welcome!
|
||||
let type_as = tagbar#prototypes#typeinfo#new()
|
||||
let type_as.ctagstype = 'flex'
|
||||
let type_as.kinds = [
|
||||
\ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'x', 'long' : 'mxtags', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_as.sro = '.'
|
||||
let type_as.kind2scope = {
|
||||
\ 'c' : 'class'
|
||||
\ }
|
||||
let type_as.scope2kind = {
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let types.mxml = type_as
|
||||
let types.actionscript = type_as
|
||||
" Fortran {{{1
|
||||
let type_fortran = tagbar#prototypes#typeinfo#new()
|
||||
let type_fortran.ctagstype = 'fortran'
|
||||
let type_fortran.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'programs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'k', 'long' : 'components', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'derived types and structures', 'fold' : 0,
|
||||
\ 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'common blocks', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'b', 'long' : 'block data', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'e', 'long' : 'entry points', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'namelists', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_fortran.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_fortran.kind2scope = {
|
||||
\ 'm' : 'module',
|
||||
\ 'p' : 'program',
|
||||
\ 'f' : 'function',
|
||||
\ 's' : 'subroutine'
|
||||
\ }
|
||||
let type_fortran.scope2kind = {
|
||||
\ 'module' : 'm',
|
||||
\ 'program' : 'p',
|
||||
\ 'function' : 'f',
|
||||
\ 'subroutine' : 's'
|
||||
\ }
|
||||
let types.fortran = type_fortran
|
||||
" Go {{{1
|
||||
let type_go = tagbar#prototypes#typeinfo#new()
|
||||
let type_go.ctagstype = 'go'
|
||||
let type_go.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'packages', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'struct members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_go.sro = '.'
|
||||
let type_go.kind2scope = {
|
||||
\ 's' : 'struct'
|
||||
\ }
|
||||
let type_go.scope2kind = {
|
||||
\ 'struct' : 's'
|
||||
\ }
|
||||
let types.go = type_go
|
||||
" HTML {{{1
|
||||
let type_html = tagbar#prototypes#typeinfo#new()
|
||||
let type_html.ctagstype = 'html'
|
||||
let type_html.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'JavaScript functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'a', 'long' : 'named anchors', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.html = type_html
|
||||
" Java {{{1
|
||||
let type_java = tagbar#prototypes#typeinfo#new()
|
||||
let type_java.ctagstype = 'java'
|
||||
let type_java.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enum types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enum constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_java.sro = '.'
|
||||
let type_java.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class'
|
||||
\ }
|
||||
let type_java.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let types.java = type_java
|
||||
" JavaScript {{{1
|
||||
let type_javascript = tagbar#prototypes#typeinfo#new()
|
||||
let type_javascript.ctagstype = 'javascript'
|
||||
let type_javascript.kinds = [
|
||||
\ {'short': 'v', 'long': 'global variables', 'fold': 0, 'stl': 0},
|
||||
\ {'short': 'c', 'long': 'classes', 'fold': 0, 'stl': 1},
|
||||
\ {'short': 'p', 'long': 'properties', 'fold': 0, 'stl': 0},
|
||||
\ {'short': 'm', 'long': 'methods', 'fold': 0, 'stl': 1},
|
||||
\ {'short': 'f', 'long': 'functions', 'fold': 0, 'stl': 1},
|
||||
\ ]
|
||||
let type_javascript.sro = '.'
|
||||
let type_javascript.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'function',
|
||||
\ 'm' : 'method',
|
||||
\ 'p' : 'property',
|
||||
\ }
|
||||
let type_javascript.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'function' : 'f',
|
||||
\ }
|
||||
let types.javascript = type_javascript
|
||||
" Lisp {{{1
|
||||
let type_lisp = tagbar#prototypes#typeinfo#new()
|
||||
let type_lisp.ctagstype = 'lisp'
|
||||
let type_lisp.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.lisp = type_lisp
|
||||
let types.clojure = type_lisp
|
||||
" Lua {{{1
|
||||
let type_lua = tagbar#prototypes#typeinfo#new()
|
||||
let type_lua.ctagstype = 'lua'
|
||||
let type_lua.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.lua = type_lua
|
||||
" Make {{{1
|
||||
let type_make = tagbar#prototypes#typeinfo#new()
|
||||
let type_make.ctagstype = 'make'
|
||||
let type_make.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'macros', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.make = type_make
|
||||
" Matlab {{{1
|
||||
let type_matlab = tagbar#prototypes#typeinfo#new()
|
||||
let type_matlab.ctagstype = 'matlab'
|
||||
let type_matlab.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.matlab = type_matlab
|
||||
" ObjectiveC {{{1
|
||||
let type_objc = tagbar#prototypes#typeinfo#new()
|
||||
let type_objc.ctagstype = 'objectivec'
|
||||
let type_objc.kinds = [
|
||||
\ {'short' : 'M', 'long' : 'preprocessor macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'i', 'long' : 'class interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'I', 'long' : 'class implementations', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'class methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'F', 'long' : 'object fields', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'object methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'type structures', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'type aliases', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerations', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 0},
|
||||
\ ]
|
||||
let type_objc.sro = ':'
|
||||
let type_objc.kind2scope = {
|
||||
\ 'i' : 'interface',
|
||||
\ 'I' : 'implementation',
|
||||
\ 's' : 'struct',
|
||||
\ }
|
||||
let type_objc.scope2kind = {
|
||||
\ 'interface' : 'i',
|
||||
\ 'implementation' : 'I',
|
||||
\ 'struct' : 's',
|
||||
\ }
|
||||
let types.objc = type_objc
|
||||
let types.objcpp = type_objc
|
||||
" Ocaml {{{1
|
||||
let type_ocaml = tagbar#prototypes#typeinfo#new()
|
||||
let type_ocaml.ctagstype = 'ocaml'
|
||||
let type_ocaml.kinds = [
|
||||
\ {'short' : 'M', 'long' : 'modules or functors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'C', 'long' : 'constructors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'exceptions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'type names', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'structure fields', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_ocaml.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_ocaml.kind2scope = {
|
||||
\ 'M' : 'Module',
|
||||
\ 'c' : 'class',
|
||||
\ 't' : 'type'
|
||||
\ }
|
||||
let type_ocaml.scope2kind = {
|
||||
\ 'Module' : 'M',
|
||||
\ 'class' : 'c',
|
||||
\ 'type' : 't'
|
||||
\ }
|
||||
let types.ocaml = type_ocaml
|
||||
" Pascal {{{1
|
||||
let type_pascal = tagbar#prototypes#typeinfo#new()
|
||||
let type_pascal.ctagstype = 'pascal'
|
||||
let type_pascal.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.pascal = type_pascal
|
||||
" Perl {{{1
|
||||
let type_perl = tagbar#prototypes#typeinfo#new()
|
||||
let type_perl.ctagstype = 'perl'
|
||||
let type_perl.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'formats', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.perl = type_perl
|
||||
" PHP {{{1
|
||||
let type_php = tagbar#prototypes#typeinfo#new()
|
||||
let type_php.ctagstype = 'php'
|
||||
let type_php.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'constant definitions', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'j', 'long' : 'javascript functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.php = type_php
|
||||
" Python {{{1
|
||||
let type_python = tagbar#prototypes#typeinfo#new()
|
||||
let type_python.ctagstype = 'python'
|
||||
let type_python.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'imports', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_python.sro = '.'
|
||||
let type_python.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'function',
|
||||
\ 'm' : 'function'
|
||||
\ }
|
||||
let type_python.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'function' : 'f'
|
||||
\ }
|
||||
let types.python = type_python
|
||||
let types.pyrex = type_python
|
||||
let types.cython = type_python
|
||||
" REXX {{{1
|
||||
let type_rexx = tagbar#prototypes#typeinfo#new()
|
||||
let type_rexx.ctagstype = 'rexx'
|
||||
let type_rexx.kinds = [
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.rexx = type_rexx
|
||||
" Ruby {{{1
|
||||
let type_ruby = tagbar#prototypes#typeinfo#new()
|
||||
let type_ruby.ctagstype = 'ruby'
|
||||
let type_ruby.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'F', 'long' : 'singleton methods', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_ruby.sro = '.'
|
||||
let type_ruby.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'm' : 'class',
|
||||
\ 'f' : 'class'
|
||||
\ }
|
||||
let type_ruby.scope2kind = {
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let types.ruby = type_ruby
|
||||
" Scheme {{{1
|
||||
let type_scheme = tagbar#prototypes#typeinfo#new()
|
||||
let type_scheme.ctagstype = 'scheme'
|
||||
let type_scheme.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sets', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.scheme = type_scheme
|
||||
let types.racket = type_scheme
|
||||
" Shell script {{{1
|
||||
let type_sh = tagbar#prototypes#typeinfo#new()
|
||||
let type_sh.ctagstype = 'sh'
|
||||
let type_sh.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.sh = type_sh
|
||||
let types.csh = type_sh
|
||||
let types.zsh = type_sh
|
||||
" SLang {{{1
|
||||
let type_slang = tagbar#prototypes#typeinfo#new()
|
||||
let type_slang.ctagstype = 'slang'
|
||||
let type_slang.kinds = [
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.slang = type_slang
|
||||
" SML {{{1
|
||||
let type_sml = tagbar#prototypes#typeinfo#new()
|
||||
let type_sml.ctagstype = 'sml'
|
||||
let type_sml.kinds = [
|
||||
\ {'short' : 'e', 'long' : 'exception declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'function definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'functor definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'signature declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'r', 'long' : 'structure declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'type definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'value bindings', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let types.sml = type_sml
|
||||
" SQL {{{1
|
||||
" The SQL ctags parser seems to be buggy for me, so this just uses the
|
||||
" normal kinds even though scopes should be available. Improvements
|
||||
" welcome!
|
||||
let type_sql = tagbar#prototypes#typeinfo#new()
|
||||
let type_sql.ctagstype = 'sql'
|
||||
let type_sql.kinds = [
|
||||
\ {'short' : 'P', 'long' : 'packages', 'fold' : 1, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'prototypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'cursors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'F', 'long' : 'record fields', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'L', 'long' : 'block label', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subtypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tables', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'triggers', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'indexes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'U', 'long' : 'publications', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'R', 'long' : 'services', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'D', 'long' : 'domains', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'V', 'long' : 'views', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'synonyms', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'x', 'long' : 'MobiLink Table Scripts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'y', 'long' : 'MobiLink Conn Scripts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'z', 'long' : 'MobiLink Properties', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.sql = type_sql
|
||||
" Tcl {{{1
|
||||
let type_tcl = tagbar#prototypes#typeinfo#new()
|
||||
let type_tcl.ctagstype = 'tcl'
|
||||
let type_tcl.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.tcl = type_tcl
|
||||
" LaTeX {{{1
|
||||
let type_tex = tagbar#prototypes#typeinfo#new()
|
||||
let type_tex.ctagstype = 'tex'
|
||||
let type_tex.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'includes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'parts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'chapters', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'subsections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'b', 'long' : 'subsubsections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'P', 'long' : 'paragraphs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'G', 'long' : 'subparagraphs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_tex.sro = '""'
|
||||
let type_tex.kind2scope = {
|
||||
\ 'p' : 'part',
|
||||
\ 'c' : 'chapter',
|
||||
\ 's' : 'section',
|
||||
\ 'u' : 'subsection',
|
||||
\ 'b' : 'subsubsection'
|
||||
\ }
|
||||
let type_tex.scope2kind = {
|
||||
\ 'part' : 'p',
|
||||
\ 'chapter' : 'c',
|
||||
\ 'section' : 's',
|
||||
\ 'subsection' : 'u',
|
||||
\ 'subsubsection' : 'b'
|
||||
\ }
|
||||
let type_tex.sort = 0
|
||||
let types.tex = type_tex
|
||||
" Vala {{{1
|
||||
" Vala is supported by the ctags fork provided by Anjuta, so only add the
|
||||
" type if the fork is used to prevent error messages otherwise
|
||||
if has_key(a:supported_types, 'vala') || executable('anjuta-tags')
|
||||
let type_vala = tagbar#prototypes#typeinfo#new()
|
||||
let type_vala.ctagstype = 'vala'
|
||||
let type_vala.kinds = [
|
||||
\ {'short' : 'e', 'long' : 'Enumerations', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'Enumeration values', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'Structures', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'Interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'Delegates', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'Classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'Properties', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'Fields', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'Methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'E', 'long' : 'Error domains', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'Error codes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'S', 'long' : 'Signals', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_vala.sro = '.'
|
||||
" 'enum' doesn't seem to be used as a scope, but it can't hurt to have
|
||||
" it here
|
||||
let type_vala.kind2scope = {
|
||||
\ 's' : 'struct',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class',
|
||||
\ 'e' : 'enum'
|
||||
\ }
|
||||
let type_vala.scope2kind = {
|
||||
\ 'struct' : 's',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c',
|
||||
\ 'enum' : 'e'
|
||||
\ }
|
||||
let types.vala = type_vala
|
||||
endif
|
||||
if !has_key(a:supported_types, 'vala') && executable('anjuta-tags')
|
||||
let types.vala.ctagsbin = 'anjuta-tags'
|
||||
endif
|
||||
" Vera {{{1
|
||||
" Why are variables 'virtual'?
|
||||
let type_vera = tagbar#prototypes#typeinfo#new()
|
||||
let type_vera.ctagstype = 'vera'
|
||||
let type_vera.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tasks', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'programs', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_vera.sro = '.' " Nesting doesn't seem to be possible
|
||||
let type_vera.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'c' : 'class',
|
||||
\ 'v' : 'virtual'
|
||||
\ }
|
||||
let type_vera.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'class' : 'c',
|
||||
\ 'virtual' : 'v'
|
||||
\ }
|
||||
let types.vera = type_vera
|
||||
" Verilog {{{1
|
||||
let type_verilog = tagbar#prototypes#typeinfo#new()
|
||||
let type_verilog.ctagstype = 'verilog'
|
||||
let type_verilog.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'e', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'net data types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'ports', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'register data types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tasks', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.verilog = type_verilog
|
||||
" VHDL {{{1
|
||||
" The VHDL ctags parser unfortunately doesn't generate proper scopes
|
||||
let type_vhdl = tagbar#prototypes#typeinfo#new()
|
||||
let type_vhdl.ctagstype = 'vhdl'
|
||||
let type_vhdl.kinds = [
|
||||
\ {'short' : 'P', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'subtypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'records', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'entities', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.vhdl = type_vhdl
|
||||
" Vim {{{1
|
||||
let type_vim = tagbar#prototypes#typeinfo#new()
|
||||
let type_vim.ctagstype = 'vim'
|
||||
let type_vim.kinds = [
|
||||
\ {'short' : 'n', 'long' : 'vimball filenames', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'a', 'long' : 'autocommand groups', 'fold' : 1, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'commands', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'maps', 'fold' : 1, 'stl' : 0}
|
||||
\ ]
|
||||
let types.vim = type_vim
|
||||
" YACC {{{1
|
||||
let type_yacc = tagbar#prototypes#typeinfo#new()
|
||||
let type_yacc.ctagstype = 'yacc'
|
||||
let type_yacc.kinds = [
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.yacc = type_yacc
|
||||
" }}}1
|
||||
|
||||
for [type, typeinfo] in items(types)
|
||||
let typeinfo.ftype = type
|
||||
endfor
|
||||
|
||||
for typeinfo in values(types)
|
||||
call typeinfo.createKinddict()
|
||||
endfor
|
||||
|
||||
return types
|
||||
endfunction
|
||||
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
File diff suppressed because it is too large
Load Diff
+626
-76
@@ -3,7 +3,7 @@
|
||||
Author: Jan Larres <jan@majutsushi.net>
|
||||
Licence: Vim licence, see |license|
|
||||
Homepage: http://majutsushi.github.com/tagbar/
|
||||
Version: 2.4.1
|
||||
Version: 2.7
|
||||
|
||||
==============================================================================
|
||||
Contents *tagbar* *tagbar-contents*
|
||||
@@ -21,6 +21,7 @@ Contents *tagbar* *tagbar-contents*
|
||||
Highlight colours ............. |tagbar-highlight|
|
||||
Automatically opening Tagbar .. |tagbar-autoopen|
|
||||
Show current tag in statusline |tagbar-statusline|
|
||||
Ignoring specific files ....... |tagbar-ignore|
|
||||
6. Extending Tagbar ................ |tagbar-extend|
|
||||
7. Troubleshooting & Known issues .. |tagbar-issues|
|
||||
8. History ......................... |tagbar-history|
|
||||
@@ -61,7 +62,7 @@ Then Tagbar would display the tag information like so:
|
||||
<
|
||||
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
|
||||
listed after its name and a colon. Third, tags for which the visibility
|
||||
information is known are prefixed with a symbol indicating that.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
@@ -75,7 +76,7 @@ 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
|
||||
variables are 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
|
||||
@@ -102,19 +103,22 @@ The following features are supported by Tagbar:
|
||||
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.
|
||||
- Additional languages are supported through universal-ctags, including
|
||||
CUDA, R, Rust, Go, and many others. See
|
||||
https://github.com/universal-ctags/ctags/blob/master/docs/news.rst#new-parsers
|
||||
for the complete list.
|
||||
- Can be extended to support arbitrary new types.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
OTHER CTAGS-COMPATIBLE PROGRAMS *tagbar-other*
|
||||
|
||||
Tagbar theoretically also supports filetype-specific programs that can output
|
||||
tag information that is compatible with ctags. However due to potential
|
||||
incompatibilities this may not always completely work. Tagbar has been tested
|
||||
with doctorjs/jsctags and will use that if present, other programs require
|
||||
some configuration (see |tagbar-extend|). If a program does not work even with
|
||||
correct configuration please contact me.
|
||||
Tagbar also supports filetype-specific programs that can produce
|
||||
ctags-compatible output, as long as these programs can write to the standard
|
||||
output. Tagbar has been tested with doctorjs/jsctags and will use that if
|
||||
present, other programs require some configuration (see |tagbar-extend|). If a
|
||||
program does not work even with correct configuration please contact me.
|
||||
|
||||
Note: Please check |tagbar-issues| for some possible issues with jsctags.
|
||||
Note: Please check |tagbar-issues| for some potential issues with jsctags.
|
||||
|
||||
==============================================================================
|
||||
2. Requirements *tagbar-requirements*
|
||||
@@ -123,16 +127,17 @@ 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:
|
||||
- At a minimum 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.
|
||||
|
||||
http://ctags.sourceforge.net/
|
||||
Universal Ctags can be downloaded from https://ctags.io/
|
||||
|
||||
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.
|
||||
BSD ctags will not work.
|
||||
Tagbar generates the tag information by itself and doesn't need (or use)
|
||||
already existing tag files.
|
||||
- File type detection must be turned on in vim. This can be done with the
|
||||
@@ -179,7 +184,7 @@ There are essentially two ways to use Tagbar:
|
||||
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,
|
||||
|g:tagbar_position| to open it elsewhere 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.
|
||||
|
||||
@@ -194,6 +199,13 @@ 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.
|
||||
|
||||
Pausing the Tagbar window~
|
||||
Use |:TagbarTogglePause| to toggle freezing/locking the Tagbar window on its
|
||||
currently displayed file. Freezing the window stops the Tagbar contents from
|
||||
changing when switching to a different source file. All Tagbar functionality
|
||||
continues to work as expected. Unfreezing the window will cause it to load the
|
||||
current source file.
|
||||
|
||||
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
|
||||
@@ -223,11 +235,12 @@ strange things will happen. This is unfortunately unavoidable.
|
||||
|
||||
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.
|
||||
line(s) 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|, in the latter case
|
||||
it will be displayed in a pop-up window. The prototype will also be displayed
|
||||
if the cursor stays on a tag for 'updatetime' milliseconds. In that case the
|
||||
prototype may be abbreviated in order to avoid |hit-enter| prompts.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
COMMANDS *tagbar-commands*
|
||||
@@ -241,7 +254,9 @@ COMMANDS *tagbar-commands*
|
||||
were set to 1)
|
||||
'j' Jump to Tagbar window if already open
|
||||
'c' Close Tagbar on tag selection (just as if |g:tagbar_autoclose| were
|
||||
set to 1, but doesn't imply 'f')
|
||||
set to 1, but doesn't imply 'f'), but only if the Tagbar window was
|
||||
opened using this command. If this is used the "c" flag will be
|
||||
shown in the statusline of the Tagbar window.
|
||||
|
||||
For example, the following command would always jump to the Tagbar window,
|
||||
opening it first if necessary, but keep it open after selecting a tag
|
||||
@@ -252,11 +267,16 @@ COMMANDS *tagbar-commands*
|
||||
Close the Tagbar window if it is open.
|
||||
|
||||
:TagbarToggle *:TagbarToggle*
|
||||
Open the Tagbar window if it is closed or close it if it is open.
|
||||
:Tagbar
|
||||
Open the Tagbar window if it is closed, or close it if it is open.
|
||||
|
||||
:TagbarOpenAutoClose *:TagbarOpenAutoClose*
|
||||
Open the Tagbar window, jump to it and close it on tag selection. This is
|
||||
an alias for ":TagbarOpen fc".
|
||||
an alias for ":TagbarOpen fjc".
|
||||
|
||||
:TagbarTogglePause *:TagbarTogglePause*
|
||||
Freezes/Unfreezes the Tagbar window. Stops the contents of the window
|
||||
from changing when a different source file is selected.
|
||||
|
||||
:TagbarSetFoldlevel[!] {number} *:TagbarSetFoldlevel*
|
||||
Set the foldlevel of the tags of the current file to {number}. The
|
||||
@@ -269,6 +289,10 @@ COMMANDS *tagbar-commands*
|
||||
Open the parent folds of the current tag in the file window as much as
|
||||
needed for the tag to be visible in the Tagbar window.
|
||||
|
||||
:TagbarCurrentTag [{flags}] *:TagbarCurrentTag*
|
||||
Echo the current tag in the command line. For {flags} see
|
||||
|tagbar-statusline|.
|
||||
|
||||
:TagbarGetTypeConfig {filetype} *:TagbarGetTypeConfig*
|
||||
Paste the Tagbar configuration of the vim filetype {filetype} at the
|
||||
current cursor position (provided that filetype is supported by Tagbar)
|
||||
@@ -281,37 +305,91 @@ COMMANDS *tagbar-commands*
|
||||
Start debug mode. This will write debug messages to file [logfile] while
|
||||
using Tagbar. If no argument is given "tagbardebug.log" in the current
|
||||
directory is used. Note: an existing file will be overwritten!
|
||||
Note also that it is usually necessary to call this command before loading
|
||||
a file that creates problems in order to get all of the needed data.
|
||||
|
||||
:TagbarDebugEnd *:TagbarDebugEnd*
|
||||
End debug mode, debug messages will no longer be written to the logfile.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
FUNCTIONS *tagbar-functions*
|
||||
|
||||
*tagbar#StopAutoUpdate()*
|
||||
Remove autocommands that might have been installed to automatically
|
||||
update tag information. This should be called after you have used
|
||||
|tagbar#currenttag| manually.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
KEY MAPPINGS *tagbar-keys*
|
||||
|
||||
The following mappings are valid in the Tagbar window:
|
||||
|
||||
<F1> Display key mapping help.
|
||||
<F1>/? Display key mapping help.
|
||||
Map option: tagbar_map_help
|
||||
<CR>/<Enter> Jump to the tag under the cursor. Doesn't work for pseudo-tags
|
||||
or generic headers.
|
||||
Map option: tagbar_map_jump
|
||||
p Jump to the tag under the cursor, but stay in the Tagbar window.
|
||||
Map option: tagbar_map_preview
|
||||
P Open the tag in a |preview-window|.
|
||||
Map option: tagbar_map_previewwin
|
||||
<LeftMouse> When on a fold icon, open or close the fold depending on the
|
||||
current state.
|
||||
<2-LeftMouse> Same as <CR>. See |g:tagbar_singleclick| if you want to use a
|
||||
single- instead of a double-click.
|
||||
<C-N> Go to the next top-level tag.
|
||||
Map option: tagbar_map_nexttag
|
||||
<C-P> Go to the previous top-level tag.
|
||||
Map option: tagbar_map_prevtag
|
||||
<Space> Display the prototype of the current tag (i.e. the line defining
|
||||
it) in the command line.
|
||||
Map option: tagbar_map_showproto
|
||||
v Hide tags that are declared non-public. Tags without any
|
||||
visibility information will still be shown.
|
||||
Map option: tagbar_map_hidenonpublic
|
||||
+/zo Open the fold under the cursor.
|
||||
Map option: tagbar_map_openfold
|
||||
-/zc Close the fold under the cursor or the current one if there is
|
||||
no fold under the cursor.
|
||||
Map option: tagbar_map_closefold
|
||||
o/za Toggle the fold under the cursor or the current one if there is
|
||||
no fold under the cursor.
|
||||
Map option: tagbar_map_togglefold
|
||||
*/zR Open all folds by setting foldlevel to 99.
|
||||
Map option: tagbar_map_openallfolds
|
||||
=/zM Close all folds by setting foldlevel to 0.
|
||||
<C-N> Go to the next top-level tag.
|
||||
<C-P> Go to the previous top-level tag.
|
||||
Map option: tagbar_map_closeallfolds
|
||||
zr Increase the fold level of the buffer by 1. Opens all folds one
|
||||
level.
|
||||
Map option: tagbar_map_incrementfolds
|
||||
zm Decrease the fold level of the buffer by 1. Closes all folds one
|
||||
level.
|
||||
Map option: tagbar_map_decrementfolds
|
||||
zj Go to the start of the next fold, like the standard Vim |zj|.
|
||||
Map option: tagbar_map_nextfold
|
||||
zk Go to the end of the previous fold, like the standard Vim |zk|.
|
||||
Map option: tagbar_map_prevfold
|
||||
s Toggle sort order between name and file order.
|
||||
Map option: tagbar_map_togglesort
|
||||
c Toggle the |g:tagbar_autoclose| option.
|
||||
Map option: tagbar_map_toggleautoclose
|
||||
t Toggle the pause (like :TagbarTogglePause)
|
||||
Map option: tagbar_map_togglepause
|
||||
x Toggle zooming the window.
|
||||
Map option: tagbar_map_zoomwin
|
||||
q Close the Tagbar window.
|
||||
Map option: tagbar_map_close
|
||||
|
||||
These mappings can be redefined with the given map options. The argument can
|
||||
be either a string or a |List| of strings. In the latter case the
|
||||
functionality will be assigned to all of the keys in the list. For example, if
|
||||
you want to remap the sort toggling functionality to "r":
|
||||
>
|
||||
let g:tagbar_map_togglesort = "r"
|
||||
<
|
||||
See |key-notation| for how to write special keys like <Space> or the keypad
|
||||
keys.
|
||||
|
||||
==============================================================================
|
||||
5. Configuration *tagbar-configuration*
|
||||
@@ -328,35 +406,131 @@ Example:
|
||||
let g:tagbar_ctags_bin = 'C:\Ctags5.8\ctags.exe'
|
||||
<
|
||||
|
||||
*g:tagbar_ctags_options*
|
||||
g:tagbar_ctags_options
|
||||
Default: undefined
|
||||
|
||||
Use this option to specify a list of filenames to pass to ctags with the
|
||||
'--options' flag. This is similar to the deffile key for tagbar type
|
||||
extensions, see |tagbar-extend|, but acts globally. The special value 'NONE'
|
||||
as the first entry disables reading of the default configuration files (e.g.
|
||||
~/.ctags). Without this, if ~/.ctags and other files listed in
|
||||
g:tagbar_ctags_options include some of the same patterns, tagbar might show
|
||||
duplicate entries.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_ctags_options = ['NONE', split(&rtp,",")[0].'/ctags.cnf']
|
||||
|
||||
This causes ctags to use settings from ~/.vim/ctags.cnf, ignoring other
|
||||
configuration files.
|
||||
|
||||
|
||||
*g:tagbar_position*
|
||||
g:tagbar_position~
|
||||
Default: 'right'
|
||||
|
||||
By default the Tagbar window will be opened on the right-hand side of vim. Set
|
||||
this option to one of 'left', 'right', 'bottom', or 'top' to open in the
|
||||
corresponding position instead. This can be useful when activating Tagbar at
|
||||
the same time as another plugin which creates a new window. It allows for more
|
||||
granular control of the Tagbar position in relation to the current active
|
||||
window.
|
||||
|
||||
If set to 'top' of 'bottom', |g:tagbar_height| will be used to determine the
|
||||
window height for the tagbar window.
|
||||
|
||||
if set to 'left' or 'right', |g:tagbar_width| will be used to determine the
|
||||
window width for the tagbar window.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_position = 'left'
|
||||
<
|
||||
*g:tagbar_left*
|
||||
g:tagbar_left~
|
||||
Default: 0
|
||||
|
||||
This option has been superceded by |g:tagbar_position| instead. It has been left
|
||||
around for backward compatibility.
|
||||
|
||||
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.
|
||||
|
||||
If |g:tagbar_vertical| is used then setting this variable will open the Tagbar
|
||||
window at the top, otherwise it will open at the bottom.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_left = 1
|
||||
<
|
||||
|
||||
*g:tagbar_vertical*
|
||||
g:tagbar_vertical~
|
||||
Default: 0
|
||||
|
||||
This option has been superceded by |g:tagbar_height| instead. It has been left
|
||||
around for backward compatibility.
|
||||
|
||||
If this is set to a positive value then the Tagbar window will be opened at
|
||||
the top or bottom of the Vim window instead of at the side. This can be useful
|
||||
for monitors that have been rotated into a vertical position. The value of
|
||||
this variable will determine the number of lines to use for the Tagbar window.
|
||||
See |g:tagbar_left| for configuring the position of the window.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_vertical = 30
|
||||
<
|
||||
|
||||
*g:tagbar_height*
|
||||
g:tagbar_height~
|
||||
Default: 0
|
||||
|
||||
If |g:tagbar_position| is set to 'bottom' or 'top', then this value is used to
|
||||
determine the height of the Tagbar window.
|
||||
See |g:tagbar_left| for configuring the position of the window.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_height = 30
|
||||
<
|
||||
*g:tagbar_width*
|
||||
g:tagbar_width~
|
||||
Default: 40
|
||||
|
||||
Width of the Tagbar window in characters.
|
||||
If |g:tagbar_position| is set to 'left' or 'right', then this value is used to
|
||||
determine the width of the Tagbar window in characters.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_width = 30
|
||||
<
|
||||
|
||||
*g:tagbar_zoomwidth*
|
||||
g:tagbar_zoomwidth~
|
||||
Default: 1
|
||||
|
||||
Width of the Tagbar window when zoomed.
|
||||
|
||||
Possible values are:
|
||||
1: Use the maximum width available.
|
||||
0: Use the width of the longest currently visible tag.
|
||||
>1: Use this width in characters.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_zoomwidth = 0
|
||||
<
|
||||
|
||||
*g:tagbar_autoclose*
|
||||
g:tagbar_autoclose~
|
||||
Default: 0
|
||||
|
||||
If you set this option the Tagbar window will automatically close when you
|
||||
jump to a tag. This implies |g:tagbar_autofocus|.
|
||||
jump to a tag. This implies |g:tagbar_autofocus|. If enabled the "C" flag will
|
||||
be shown in the statusline of the Tagbar window. This can also be toggled with
|
||||
a key, see |tagbar-keys|.
|
||||
|
||||
Example:
|
||||
>
|
||||
@@ -389,6 +563,18 @@ Example:
|
||||
let g:tagbar_sort = 0
|
||||
<
|
||||
|
||||
*g:tagbar_case_insensitive*
|
||||
g:tagbar_case_insensitive~
|
||||
Default: 0
|
||||
|
||||
If this option is set a case-insensitive comparison is used when the tags
|
||||
are sorted according to their name. If it is unset a case-sensitive
|
||||
comparison is used.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_case_insensitive = 1
|
||||
<
|
||||
*g:tagbar_compact*
|
||||
g:tagbar_compact~
|
||||
Default: 0
|
||||
@@ -402,12 +588,85 @@ Example:
|
||||
let g:tagbar_compact = 1
|
||||
<
|
||||
|
||||
*g:tagbar_indent*
|
||||
g:tagbar_indent~
|
||||
Default: 2
|
||||
|
||||
The number of spaces by which each level is indented. This allows making the
|
||||
display more compact or more spacious.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_indent = 1
|
||||
<
|
||||
|
||||
*g:tagbar_show_balloon*
|
||||
g:tagbar_show_balloon~
|
||||
Default: 1
|
||||
|
||||
Whether balloon messages should be shown in the Tagbar window.
|
||||
|
||||
Possible values are:
|
||||
0: Don't show any balloon messages.
|
||||
1: Show balloon messages. This is only available in the GUI when
|
||||
compiled with the |+balloon_eval| feature.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_show_balloon = 0
|
||||
<
|
||||
|
||||
*g:tagbar_show_visibility*
|
||||
g:tagbar_show_visibility~
|
||||
Default: 1
|
||||
|
||||
Show the visibility symbols (public/protected/private) to the left of the tag
|
||||
name.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_show_visibility = 0
|
||||
<
|
||||
|
||||
*g:tagbar_show_linenumbers*
|
||||
g:tagbar_show_linenumbers~
|
||||
Default: 0
|
||||
|
||||
Whether line numbers should be shown in the Tagbar window.
|
||||
|
||||
Possible values are:
|
||||
0: Don't show any line numbers.
|
||||
1: Show absolute line numbers.
|
||||
2: Show relative line numbers.
|
||||
-1: Use the global line number settings.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_show_linenumbers = 2
|
||||
<
|
||||
|
||||
*g:tagbar_hide_nonpublic*
|
||||
g:tagbar_hide_nonpublic~
|
||||
Default: 0
|
||||
|
||||
Hide tags that are declared non-public. Tags without any visibility
|
||||
information will still be shown. If enabled the "v" flag will be shown in the
|
||||
statusline of the Tagbar window. This can also be toggled with a key, see
|
||||
|tagbar-keys|.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_hide_nonpublic = 1
|
||||
<
|
||||
|
||||
*g:tagbar_expand*
|
||||
g:tagbar_expand~
|
||||
Default: 0
|
||||
|
||||
If this option is set the Vim window will be expanded by the width of the
|
||||
Tagbar window if using a GUI version of Vim.
|
||||
If this option is set to 1 the Vim window will be expanded by the width of the
|
||||
Tagbar window if using a GUI version of Vim. Setting it to 2 will also try
|
||||
expanding a terminal, but note that this is not supported by all terminals.
|
||||
See also |xterm-resize|.
|
||||
|
||||
Example:
|
||||
>
|
||||
@@ -451,7 +710,7 @@ Examples (don't worry if some of the characters aren't displayed correctly,
|
||||
just choose other characters in that case):
|
||||
>
|
||||
let g:tagbar_iconchars = ['â–¶', 'â–Ľ'] (default on Linux and Mac OS X)
|
||||
let g:tagbar_iconchars = ['â–ľ', 'â–¸']
|
||||
let g:tagbar_iconchars = ['â–¸', 'â–ľ']
|
||||
let g:tagbar_iconchars = ['â–·', 'â—˘']
|
||||
let g:tagbar_iconchars = ['+', '-'] (default on Windows)
|
||||
<
|
||||
@@ -460,32 +719,55 @@ just choose other characters in that case):
|
||||
g:tagbar_autoshowtag~
|
||||
Default: 0
|
||||
|
||||
If this variable is set and the current tag is inside of a closed fold then
|
||||
the folds will be opened as much as needed for the tag to be visible so it can
|
||||
be highlighted. If it is not set then the folds won't be opened and the parent
|
||||
tag will be highlighted instead. You can use the |:TagbarShowTag| command to
|
||||
open the folds manually.
|
||||
If this variable is set to 1 and the current tag is inside of a closed fold
|
||||
then the folds will be opened as much as needed for the tag to be visible so
|
||||
it can be highlighted. If it is set to 0 then the folds will only be opened
|
||||
when opening the Tagbar window and the current tag is inside a closed fold,
|
||||
otherwise the folds won't be opened and the parent tag will be highlighted
|
||||
instead. If it is set to 2 then the folds will never be opened automatically.
|
||||
|
||||
You can use the |:TagbarShowTag| command to open the folds manually.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_autoshowtag = 1
|
||||
<
|
||||
|
||||
*g:tagbar_updateonsave_maxlines*
|
||||
g:tagbar_updateonsave_maxlines~
|
||||
Default: 5000
|
||||
*g:tagbar_previewwin_pos*
|
||||
g:tagbar_previewwin_pos~
|
||||
Default: "topleft", or "rightbelow vertical" if |g:tagbar_vertical| is set
|
||||
|
||||
If the current file has fewer lines than the value of this variable, Tagbar
|
||||
will update immediately after saving the file. If it is longer then the update
|
||||
will only happen on the |CursorHold| event and when switching buffers (or
|
||||
windows). This is to prevent the time it takes to save a large file from
|
||||
becoming annoying in case you have a slow computer. If you have a fast
|
||||
computer you can set it to a higher value.
|
||||
The position of the preview window. Valid values are the window splitting
|
||||
commands that are described starting from |:vertical|. Set it to an empty
|
||||
string to use the options 'splitbelow' and 'splitright'.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_updateonsave_maxlines = 10000
|
||||
let g:tagbar_previewwin_pos = "aboveleft"
|
||||
<
|
||||
If you want to disable line numbers in the preview window put something like
|
||||
this into your vimrc:
|
||||
>
|
||||
autocmd BufWinEnter * if &previewwindow | setlocal nonumber | endif
|
||||
<
|
||||
|
||||
*g:tagbar_autopreview*
|
||||
g:tagbar_autopreview~
|
||||
Default: 0
|
||||
|
||||
If this variable is set to 1 then moving the cursor in the Tagbar window will
|
||||
automatically show the current tag in the preview window.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_autopreview = 1
|
||||
<
|
||||
|
||||
*g:tagbar_updateonsave_maxlines*
|
||||
g:tagbar_updateonsave_maxlines~
|
||||
|
||||
Deprecated. Tagbar will now always get updated when the file is being saved.
|
||||
|
||||
|
||||
*g:tagbar_systemenc*
|
||||
g:tagbar_systemenc~
|
||||
@@ -496,12 +778,91 @@ system is different from the one set in Vim, i.e. the 'encoding' option. For
|
||||
example, if you use a Simplified Chinese Windows version that has a system
|
||||
encoding of "cp936", and you have set 'encoding' to "utf-8", then you would
|
||||
have to set this variable to "cp936".
|
||||
Note that this requires Vim to be compiled with the |+multi_byte| and |+iconv|
|
||||
features to work.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_systemenc = 'cp936'
|
||||
<
|
||||
|
||||
*g:tagbar_status_func*
|
||||
g:tagbar_status_func~
|
||||
Default: undefined
|
||||
|
||||
This is the name of a function whose return value will be used to draw the
|
||||
statusline of the Tagbar window.
|
||||
|
||||
The function has to take four arguments:
|
||||
1. current: Whether Tagbar is the current window; 0 or 1.
|
||||
2. sort: The sort order of the tags; 'Name' if they are sorted by name and
|
||||
'Order' if they are sorted by their order of appearance in the file.
|
||||
3. fname: The name of the file that the tags belong to.
|
||||
4. flags: A list of characters that represent various state in the Tagbar
|
||||
window.
|
||||
|
||||
In order to avoid possible future additions to the arguments resulting in an
|
||||
error it is recommended to add an additional vararg to the signature (see
|
||||
|a:0|).
|
||||
|
||||
Here is an example that, when put into your vimrc, will emulate Tagbar's
|
||||
default statusline:
|
||||
>
|
||||
function! TagbarStatusFunc(current, sort, fname, flags, ...) abort
|
||||
let colour = a:current ? '%#StatusLine#' : '%#StatusLineNC#'
|
||||
let flagstr = join(flags, '')
|
||||
if flagstr != ''
|
||||
let flagstr = '[' . flagstr . '] '
|
||||
endif
|
||||
return colour . '[' . sort . '] ' . flagstr . fname
|
||||
endfunction
|
||||
let g:tagbar_status_func = 'TagbarStatusFunc'
|
||||
<
|
||||
*g:tagbar_no_status_line*
|
||||
g:no_status_line~
|
||||
Default: undefined
|
||||
|
||||
This option will prevent any status line updates being done by Tagbar. Use
|
||||
this in the event where another plugin is being used to update the status
|
||||
line. If |g:tagbar_status_func| is set, then that function will never be
|
||||
called.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:no_status_line = 1
|
||||
<
|
||||
|
||||
*g:tagbar_silent*
|
||||
g:tagbar_silent~
|
||||
Default: 0
|
||||
|
||||
By default if the cursor is over a tag in the tagbar window, information
|
||||
about the tag is echoed out. Set this option to disable that behavior.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_silent = 1
|
||||
<
|
||||
*g:tagbar_use_cache*
|
||||
g:tagbar_use_cache~
|
||||
Default: 1
|
||||
|
||||
By default the file contents are passed to ctags by writing them to
|
||||
a temporary file and invoking ctags on that file. This greatly speeds up tag
|
||||
generation in the event of slow file systems such as network shares and
|
||||
enables tagbar to run even on netrw virtual files that ctags would otherwise
|
||||
not be able to find at all. However it does incure the cost of an extra write
|
||||
operation. Additionally not all sysems are able to let programs share access
|
||||
to temporary file space (for example Snap packages cannot read from the host
|
||||
system's temp file space). This setting can disable the cache mechanism
|
||||
entriely forcing the tags to be generated from the existing copy of the file
|
||||
on disk rather than the current buffer written to a temporary file.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_use_cache = 0
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
HIGHLIGHT COLOURS *tagbar-highlight*
|
||||
|
||||
@@ -535,14 +896,14 @@ TagbarFoldIcon
|
||||
TagbarHighlight
|
||||
The colour that is used for automatically highlighting the current tag.
|
||||
|
||||
TagbarAccessPublic
|
||||
The "public" visibility/access symbol.
|
||||
TagbarVisibilityPublic
|
||||
The "public" visibility symbol.
|
||||
|
||||
TagbarAccessProtected
|
||||
The "protected" visibility/access symbol.
|
||||
TagbarVisibilityProtected
|
||||
The "protected" visibility symbol.
|
||||
|
||||
TagbarAccessPrivate
|
||||
The "private" visibility/access symbol.
|
||||
TagbarVisibilityPrivate
|
||||
The "private" visibility symbol.
|
||||
|
||||
If you want to change any of those colours put a line like the following in
|
||||
your vimrc:
|
||||
@@ -602,7 +963,8 @@ you want to, by calling the tagbar#currenttag() function. The current tag is
|
||||
exactly the same as would be highlighted in the Tagbar window if it is open.
|
||||
It is defined as the nearest tag upwards in the file starting from the cursor
|
||||
position. This means that for example in a function it should usually be the
|
||||
name of the function.
|
||||
name of the function. You can define which tags will be shown in this manner,
|
||||
read |tagbar-extend| (especially the "kinds" entry) on how to do that.
|
||||
|
||||
The function has the following signature:
|
||||
|
||||
@@ -617,10 +979,44 @@ tagbar#currenttag({format}, {default} [, {flags}])
|
||||
's' If the tag is a function, the complete signature will be shown,
|
||||
otherwise just "()" will be appended to distinguish functions from
|
||||
other tags.
|
||||
'p' Display the raw prototype instead of the parsed tag. This can be
|
||||
useful in cases where ctags doesn't report some information, like
|
||||
the signature. Note that this can get quite long.
|
||||
|
||||
For example, if you put the following into your statusline: >
|
||||
%{tagbar#currenttag('[%s] ', '')}
|
||||
< then the function "myfunc" will be show as "[myfunc()] ".
|
||||
%{tagbar#currenttag('[%s] ','')}
|
||||
< then the function "myfunc" will be shown as "[myfunc()] ".
|
||||
|
||||
Additionally you can show the kind (type) of the current tag, using following
|
||||
function:
|
||||
|
||||
tagbar#currenttagtype({format}, {default})
|
||||
{format} and {default} are treated in the same way as for
|
||||
tagbar#currenttag function.
|
||||
|
||||
Altering previous example, like below: >
|
||||
%{tagbar#currenttag('[%s] ','')}\ %{tagbar#currenttagtype("(%s) ", '')
|
||||
< the function "myfunc" will be shown as "[myfunc()] (function)".
|
||||
|
||||
Note that if there is an error when processing the current file no error
|
||||
message will be shown in order to not disrupt the statusline. If the function
|
||||
doesn't seem to work right open the Tagbar window to see any error messages.
|
||||
|
||||
Note you should call |tagbar#StopAutoUpdate| manually in case you do not want
|
||||
to display the current tag anymore. Otherwise the autocommands to update the
|
||||
state are being executed all the time still.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
IGNORING SPECIFIC FILES *tagbar-ignore*
|
||||
|
||||
You can ignore specific files by setting the |buffer-variable|
|
||||
"b:tagbar_ignore" to 1. This is best done with an |autocommand|:
|
||||
>
|
||||
autocmd BufNewFile,BufReadPost foo.cpp let b:tagbar_ignore = 1
|
||||
<
|
||||
Note that autocommands are order-sensitive, so make sure that this autocommand
|
||||
gets defined before the ones that Tagbar defines so the variable will get
|
||||
found at the right time.
|
||||
|
||||
==============================================================================
|
||||
6. Extending Tagbar *tagbar-extend*
|
||||
@@ -651,10 +1047,9 @@ support package for the language. Some tips on how to write such a program are
|
||||
given at the end of this section.
|
||||
|
||||
Before writing your own extension have a look at the wiki
|
||||
(https://github.com/majutsushi/tagbar/wiki/Support-for-additional-filetypes)
|
||||
or try googling for existing ones. If you do end up creating your own
|
||||
extension please consider adding it to the wiki so that others will be able to
|
||||
use it, too.
|
||||
(https://github.com/majutsushi/tagbar/wiki) or try googling for existing ones.
|
||||
If you do end up creating your own extension please consider adding it to the
|
||||
wiki so that others can benefit from it, too.
|
||||
|
||||
Every type definition in Tagbar is a dictionary with the following keys:
|
||||
|
||||
@@ -706,7 +1101,7 @@ kind2scope: A dictionary describing the mapping of tag kinds (in their
|
||||
int var;
|
||||
};
|
||||
< We then run ctags in the following way: >
|
||||
ctags -f - --format=2 --excmd=pattern --extra= --fields=nksaSmt test.cpp
|
||||
ctags -f - --format=2 --excmd=pattern --extras= --fields=nksaSmt 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
|
||||
@@ -753,6 +1148,25 @@ ctagsargs: The arguments to be passed to the filetype-specific ctags program
|
||||
program output its data on stdout. Not used for the normal ctags
|
||||
program.
|
||||
|
||||
The value of ctagsargs may be a |List| of strings (a string for
|
||||
each argument), or a single string (|expr-string|) of all the
|
||||
arguments.
|
||||
|
||||
When the value of ctagsargs is a list, tagbar.vim takes care of
|
||||
escaping each argument in the list as required for the current
|
||||
'shell' type.
|
||||
|
||||
When the value of ctagsargs is a string, it must be properly
|
||||
escaped (if required by the current shell type). The reason
|
||||
tagbar.vim does not attempt to escape the string in this case is
|
||||
because if there is a space, it is ambiguous as to whether the
|
||||
space is delimiting an argument or included in the argument. To
|
||||
avoid this amiguity, tagbar.vim expects the string to be already
|
||||
escaped as required.
|
||||
|
||||
If special escaping is required for different OS shell types or if
|
||||
in doubt, then it is recommended to define ctagsargs with a List.
|
||||
|
||||
|
||||
You then have to assign this dictionary to a variable in your vimrc with the
|
||||
name
|
||||
@@ -916,6 +1330,38 @@ that.
|
||||
Tagbar should now be able to show the sections and other tags from LaTeX
|
||||
files.
|
||||
|
||||
Note: As of 2012-05-05 the ctags development version contains an improved
|
||||
LaTeX parser that works better than the example configuration presented here.
|
||||
So if you are using a development build newer than that or a stable version
|
||||
newer than 5.8 you should use the built-in support instead of this example.
|
||||
|
||||
Project-specific configuration~
|
||||
|
||||
In addition to the normal global configuration it is also possible to have
|
||||
project-specific settings. This is mostly useful for additional ctags options,
|
||||
like for example macros to ignore. Or maybe you want to do things like folding
|
||||
certain tag kinds in some projects.
|
||||
|
||||
In order to use this feature you need to create User |autocommand|s in an
|
||||
augroup called "TagbarProjects" and have it create a buffer-local variable
|
||||
called "b:tagbar_type". This variable has to hold a type definition just like
|
||||
the normal ones described in this chapter. If there already is a definition
|
||||
then the project-specific one will be merged with the existing one, with the
|
||||
project-specific one taking precedence. This makes it possible to have
|
||||
project-specific overrides. This definition will then be applied only to the
|
||||
files matched by the autocommand.
|
||||
|
||||
Note that there can be multiple definitions of the augroup with their own
|
||||
autocommands (for example in separate project directories); they will get
|
||||
merged automatically by Vim.
|
||||
|
||||
Example:
|
||||
>
|
||||
augroup TagbarProjects
|
||||
autocmd User ~/myproject/*.c let b:tagbar_type = {'deffile' : '~/myproject/ctags.cnf'}
|
||||
augroup END
|
||||
<
|
||||
|
||||
Writing your own tag-generating program~
|
||||
If you want to write your own program for generating tags then here are some
|
||||
imporant tips to get it to integrate well with Tagbar:
|
||||
@@ -928,17 +1374,18 @@ imporant tips to get it to integrate well with Tagbar:
|
||||
(stdout), it doesn't generate files and reads them in after that. So make
|
||||
sure that your program has an option to output the tags on stdout.
|
||||
- Some fields are supported for providing additional information about a
|
||||
tag. One field is required: the "kind" field as a single letter without
|
||||
a "kind:" fieldname. This field has to be the first one in the list. All
|
||||
other fields need to have a fieldname in order to determine what they are.
|
||||
The following fields are supported for all filetypes:
|
||||
tag. One field is required: the "kind" field as a single letter, either
|
||||
with or without a "kind:" fieldname. If it is used without the fieldname
|
||||
then it has to be the first field in the list. All other fields need to
|
||||
have a fieldname in order to determine what they are. The following fields
|
||||
are supported for all filetypes:
|
||||
|
||||
* line: The line number of the tag.
|
||||
* column: The column number of the tag.
|
||||
* signature: The signature of a function.
|
||||
* access: Visibility/access information of a tag; the values
|
||||
"public", "protected" and "private" will be denoted with
|
||||
a special symbol in Tagbar.
|
||||
* access: Visibility information of a tag; the values "public",
|
||||
"protected" and "private" will be denoted with a special
|
||||
symbol in Tagbar.
|
||||
|
||||
In addition fields that describe the surrounding scope of the tag are
|
||||
supported if they are specified in the type configuration as explained at
|
||||
@@ -958,17 +1405,46 @@ try running ctags manually to see whether ctags reports the wrong information
|
||||
or whether that information is correct and Tagbar does something wrong. To run
|
||||
ctags manually execute the following command in a terminal:
|
||||
>
|
||||
ctags -f - --format=2 --excmd=pattern --extra= --fields=nksaSmt myfile
|
||||
ctags -f - --format=2 --excmd=pattern --extras= --fields=nksaSmt myfile
|
||||
<
|
||||
If you set the |g:tagbar_ctags_bin| variable you probably have to use the same
|
||||
value here instead of simply "ctags".
|
||||
value here instead of simply "ctags". Also, if you use
|
||||
|:tagbar_ctags_options|, you should include the equivalent --options flag in
|
||||
the call to ctags.
|
||||
|
||||
If Tagbar doesn't seem to work at all, but you don't get any error messages,
|
||||
you can use Tagbar's debug mode to try to find the source of the problem (see
|
||||
|tagbar-commands| on how to invoke it). In that case you should especially pay
|
||||
attention to the reported file type and the ctags command line in the log
|
||||
file.
|
||||
If something more fundamental isn't working right then try running the
|
||||
|:messages| command to see if Tagbar printed any error messages that might
|
||||
have been missed.
|
||||
|
||||
If the bug does seem to be in Tagbar then you can use Tagbar's debug mode to
|
||||
try to find the source of the problem. Usually you would use it like this:
|
||||
|
||||
1. Remove the |tagbar-statusline| support from your vimrc if you use it
|
||||
unless the problem is with this functionality, and make sure you don't
|
||||
have any autocommands that load Tagbar on startup.
|
||||
2. Open Vim without loading any files.
|
||||
3. Run :TagbarDebug.
|
||||
4. Open the file you are having problems with.
|
||||
5. Open Tagbar. If the problem is with the statusline functionality this
|
||||
step may not be necessary.
|
||||
6. Exit Vim.
|
||||
|
||||
Note that it is important that the "TagbarDebug" command gets called before
|
||||
any other call to a Tagbar command or function, so step 1 is important to get
|
||||
a complete log.
|
||||
|
||||
This should leave a file called "tagbardebug.log" in the current directory. If
|
||||
ctags got executed successfully then there should also be a file called
|
||||
"tagbardebug.log.ctags_out" which contains the full output of the last ctags
|
||||
invocation. This can be very helpful when debugging but may contain sensitive
|
||||
information and is therefore kept in a separate file.
|
||||
|
||||
See |tagbar-commands| for more information on the debug commands. When you
|
||||
look at the file you should especially pay attention to the reported file type
|
||||
and the ctags command line in the log file.
|
||||
|
||||
|
||||
Known issues~
|
||||
|
||||
- jsctags has to be newer than 2011-01-06 since it needs the "-f" option to
|
||||
work. Also, the output of jsctags seems to be a bit unreliable at the
|
||||
@@ -1022,6 +1498,70 @@ file.
|
||||
==============================================================================
|
||||
8. History *tagbar-history*
|
||||
|
||||
2.7 (2017-01-09)
|
||||
- Added support for Universal Ctags, courtesy of Dmytro Konstantinov
|
||||
- Added option to arrange Tagbar window vertically
|
||||
- Added case-insensitive sort option, courtesy of Martin Vuille
|
||||
- Added option to configure zoom width
|
||||
- Added option to hide non-public tags
|
||||
- Added "silent" option to disable the display of tag information in the
|
||||
command line, courtesy of Anmol Sethi
|
||||
- Added mappings for moving between folds
|
||||
- Improved handling of calling :bdelete/:bwipeout/:quit when Tagbar is
|
||||
open
|
||||
- Improved handling of multiple tabs with separate Tagbar instances,
|
||||
courtesy of Martin Vuille
|
||||
- Better handling of various errors to allow Tagbar to continue working
|
||||
- Various other small improvements and bugfixes
|
||||
|
||||
2.6.1 (2014-01-23)
|
||||
- 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
|
||||
|
||||
2.6 (2013-12-06)
|
||||
- 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.
|
||||
|
||||
2.5 (2013-03-25)
|
||||
- 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.
|
||||
|
||||
2.4.1 (2012-07-16)
|
||||
- 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
|
||||
@@ -1147,14 +1687,24 @@ software.
|
||||
The folding technique was inspired by NERDTree by Martin Grenfell.
|
||||
|
||||
Thanks to the following people for code contributions, feature suggestions etc:
|
||||
Peter Butkovic
|
||||
Zhao Cai
|
||||
Jan Christoph Ebersbach
|
||||
Vadim Fint
|
||||
Leandro Freitas
|
||||
Ingo Karkat
|
||||
Audrius KaĹľukauskas
|
||||
Michael McClimon
|
||||
Seth Milliken
|
||||
Kien N
|
||||
Darcy Parker
|
||||
fritzophrenic
|
||||
pielgrzym
|
||||
Taybin Rutkin
|
||||
Kian Ryan
|
||||
John Szakmeister
|
||||
Ville Valkonen
|
||||
Techlive Zheng
|
||||
|
||||
==============================================================================
|
||||
vim: tw=78 ts=8 sw=4 sts=4 et ft=help
|
||||
|
||||
+107
-51
@@ -4,7 +4,7 @@
|
||||
" Author: Jan Larres <jan@majutsushi.net>
|
||||
" Licence: Vim licence
|
||||
" Website: http://majutsushi.github.com/tagbar/
|
||||
" Version: 2.4.1
|
||||
" Version: 2.7
|
||||
" Note: This plugin was heavily inspired by the 'Taglist' plugin by
|
||||
" Yegappan Lakshmanan and uses a small amount of code from it.
|
||||
"
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
if &cp || exists('g:loaded_tagbar')
|
||||
if &compatible || exists('g:loaded_tagbar')
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -42,62 +42,115 @@ if v:version == 700 && !has('patch167')
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_left')
|
||||
let g:tagbar_left = 0
|
||||
endif
|
||||
function! s:init_var(var, value) abort
|
||||
if !exists('g:tagbar_' . a:var)
|
||||
execute 'let g:tagbar_' . a:var . ' = ' . string(a:value)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
if !exists('g:tagbar_width')
|
||||
let g:tagbar_width = 40
|
||||
endif
|
||||
function! s:setup_options() abort
|
||||
if exists('g:tagbar_position')
|
||||
if g:tagbar_position !~# '\v(top|bottom)'
|
||||
let previewwin_pos = 'topleft'
|
||||
else
|
||||
let previewwin_pos = 'rightbelow vertical'
|
||||
endif
|
||||
let default_pos = g:tagbar_position
|
||||
else
|
||||
if exists('g:tagbar_vertical') && g:tagbar_vertical > 0
|
||||
let previewwin_pos = 'rightbelow vertical'
|
||||
if exists('g:tagbar_left') && g:tagbar_left
|
||||
let default_pos = 'top'
|
||||
else
|
||||
let default_pos = 'bottom'
|
||||
endif
|
||||
let g:tagbar_height = g:tagbar_vertical
|
||||
elseif exists('g:tagbar_left') && g:tagbar_left
|
||||
let previewwin_pos = 'topleft'
|
||||
let default_pos = 'left'
|
||||
else
|
||||
let previewwin_pos = 'topleft'
|
||||
let default_pos = 'right'
|
||||
endif
|
||||
endif
|
||||
let options = [
|
||||
\ ['autoclose', 0],
|
||||
\ ['autofocus', 0],
|
||||
\ ['autopreview', 0],
|
||||
\ ['autoshowtag', 0],
|
||||
\ ['case_insensitive', 0],
|
||||
\ ['compact', 0],
|
||||
\ ['expand', 0],
|
||||
\ ['foldlevel', 99],
|
||||
\ ['hide_nonpublic', 0],
|
||||
\ ['height', 10],
|
||||
\ ['indent', 2],
|
||||
\ ['left', 0],
|
||||
\ ['previewwin_pos', previewwin_pos],
|
||||
\ ['show_balloon', 1],
|
||||
\ ['show_visibility', 1],
|
||||
\ ['show_linenumbers', 0],
|
||||
\ ['singleclick', 0],
|
||||
\ ['sort', 1],
|
||||
\ ['systemenc', &encoding],
|
||||
\ ['vertical', 0],
|
||||
\ ['position', default_pos],
|
||||
\ ['width', 40],
|
||||
\ ['zoomwidth', 1],
|
||||
\ ['silent', 0],
|
||||
\ ['use_cache', 1],
|
||||
\ ]
|
||||
|
||||
if !exists('g:tagbar_autoclose')
|
||||
let g:tagbar_autoclose = 0
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_autofocus')
|
||||
let g:tagbar_autofocus = 0
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_sort')
|
||||
let g:tagbar_sort = 1
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_compact')
|
||||
let g:tagbar_compact = 0
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_expand')
|
||||
let g:tagbar_expand = 0
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_singleclick')
|
||||
let g:tagbar_singleclick = 0
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_foldlevel')
|
||||
let g:tagbar_foldlevel = 99
|
||||
endif
|
||||
for [opt, val] in options
|
||||
call s:init_var(opt, val)
|
||||
endfor
|
||||
endfunction
|
||||
call s:setup_options()
|
||||
|
||||
if !exists('g:tagbar_iconchars')
|
||||
if has('multi_byte') && has('unix') && &encoding == 'utf-8' &&
|
||||
\ (empty(&termencoding) || &termencoding == 'utf-8')
|
||||
if has('multi_byte') && has('unix') && &encoding ==# 'utf-8' &&
|
||||
\ (!exists('+termencoding') || empty(&termencoding) || &termencoding ==# 'utf-8')
|
||||
let g:tagbar_iconchars = ['â–¶', 'â–Ľ']
|
||||
else
|
||||
let g:tagbar_iconchars = ['+', '-']
|
||||
endif
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_autoshowtag')
|
||||
let g:tagbar_autoshowtag = 0
|
||||
endif
|
||||
function! s:setup_keymaps() abort
|
||||
let keymaps = [
|
||||
\ ['jump', '<CR>'],
|
||||
\ ['preview', 'p'],
|
||||
\ ['previewwin', 'P'],
|
||||
\ ['nexttag', '<C-N>'],
|
||||
\ ['prevtag', '<C-P>'],
|
||||
\ ['showproto', '<Space>'],
|
||||
\ ['hidenonpublic', 'v'],
|
||||
\
|
||||
\ ['openfold', ['+', '<kPlus>', 'zo']],
|
||||
\ ['closefold', ['-', '<kMinus>', 'zc']],
|
||||
\ ['togglefold', ['o', 'za']],
|
||||
\ ['openallfolds', ['*', '<kMultiply>', 'zR']],
|
||||
\ ['closeallfolds', ['=', 'zM']],
|
||||
\ ['incrementfolds', ['zr']],
|
||||
\ ['decrementfolds', ['zm']],
|
||||
\ ['nextfold', 'zj'],
|
||||
\ ['prevfold', 'zk'],
|
||||
\
|
||||
\ ['togglesort', 's'],
|
||||
\ ['togglecaseinsensitive', 'i'],
|
||||
\ ['toggleautoclose', 'c'],
|
||||
\ ['togglepause', 't'],
|
||||
\ ['zoomwin', 'x'],
|
||||
\ ['close', 'q'],
|
||||
\ ['help', ['<F1>', '?']],
|
||||
\ ]
|
||||
|
||||
if !exists('g:tagbar_updateonsave_maxlines')
|
||||
let g:tagbar_updateonsave_maxlines = 5000
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_systemenc')
|
||||
let g:tagbar_systemenc = &encoding
|
||||
endif
|
||||
for [map, key] in keymaps
|
||||
call s:init_var('map_' . map, key)
|
||||
unlet key
|
||||
endfor
|
||||
endfunction
|
||||
call s:setup_keymaps()
|
||||
|
||||
augroup TagbarSession
|
||||
autocmd!
|
||||
@@ -105,15 +158,18 @@ augroup TagbarSession
|
||||
augroup END
|
||||
|
||||
" Commands {{{1
|
||||
command! -nargs=0 Tagbar call tagbar#ToggleWindow()
|
||||
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 -bang TagbarSetFoldlevel call tagbar#SetFoldLevel(<args>, <bang>0)
|
||||
command! -nargs=0 TagbarShowTag call tagbar#OpenParents()
|
||||
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=? TagbarDebug call tagbar#debug#start_debug(<f-args>)
|
||||
command! -nargs=0 TagbarDebugEnd call tagbar#debug#stop_debug()
|
||||
command! -nargs=0 TagbarTogglePause call tagbar#toggle_pause()
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
|
||||
+24
-23
@@ -3,48 +3,46 @@
|
||||
" Author: Jan Larres <jan@majutsushi.net>
|
||||
" Licence: Vim licence
|
||||
" Website: http://majutsushi.github.com/tagbar/
|
||||
" Version: 2.4.1
|
||||
" Version: 2.7
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:ic = g:tagbar_iconchars[0]
|
||||
if s:ic =~ '[]^\\-]'
|
||||
let s:ic = '\' . s:ic
|
||||
endif
|
||||
let s:io = g:tagbar_iconchars[1]
|
||||
if s:io =~ '[]^\\-]'
|
||||
let s:io = '\' . s:io
|
||||
endif
|
||||
let s:ics = escape(join(g:tagbar_iconchars, ''), ']^\-')
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . '] \)\@<=[^-+: ]\+[^:]\+$'
|
||||
let s:pattern = '\(^[' . s:ics . '] \?\)\@3<=[^-+: ]\+[^:]\+$'
|
||||
execute "syntax match TagbarKind '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . '][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
||||
let s:pattern = '\(\S\@<![' . s:ics . '][-+# ]\?\)\@<=[^*(]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
||||
execute "syntax match TagbarScope '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '[' . s:ic . s:io . ']\([-+# ]\)\@='
|
||||
let s:pattern = '\S\@<![' . s:ics . ']\([-+# ]\?\)\@='
|
||||
execute "syntax match TagbarFoldIcon '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=+\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessPublic '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=#\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessProtected '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=-\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessPrivate '" . s:pattern . "'"
|
||||
let s:pattern = '\(\S\@<![' . s:ics . ' ]\)\@<=+\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarVisibilityPublic '" . s:pattern . "'"
|
||||
let s:pattern = '\(\S\@<![' . s:ics . ' ]\)\@<=#\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarVisibilityProtected '" . s:pattern . "'"
|
||||
let s:pattern = '\(\S\@<![' . s:ics . ' ]\)\@<=-\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarVisibilityPrivate '" . s:pattern . "'"
|
||||
|
||||
unlet s:pattern
|
||||
|
||||
syntax match TagbarHelp '^".*' contains=TagbarHelpKey,TagbarHelpTitle
|
||||
syntax match TagbarHelpKey '" \zs.*\ze:' contained
|
||||
syntax match TagbarHelpTitle '" \zs-\+ \w\+ -\+' contained
|
||||
|
||||
syntax match TagbarNestedKind '^\s\+\[[^]]\+\]$'
|
||||
syntax match TagbarComment '^".*'
|
||||
syntax match TagbarType ' : \zs.*'
|
||||
syntax match TagbarSignature '(.*)'
|
||||
syntax match TagbarPseudoID '\*\ze :'
|
||||
|
||||
highlight default link TagbarComment Comment
|
||||
highlight default link TagbarHelp Comment
|
||||
highlight default link TagbarHelpKey Identifier
|
||||
highlight default link TagbarHelpTitle PreProc
|
||||
highlight default link TagbarKind Identifier
|
||||
highlight default link TagbarNestedKind TagbarKind
|
||||
highlight default link TagbarScope Title
|
||||
@@ -57,7 +55,10 @@ 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"
|
||||
let b:current_syntax = 'tagbar'
|
||||
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
|
||||
Reference in New Issue
Block a user