Vim plugin for rebuild tags files with ctags
Python Vim script
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
autoload
doc
plugin
.gitignore
README.rst

README.rst

RebTags

RebTags provides a easy way to rebuild your tags file based on your project directory. It uses the repository directories (.git, .hg, _darcs...) as markers or a .ctags configuration file to find where must build the tags file.

IMPORTANT NOTE: Take care with your .ctags configuration and the g:rebtags_extra_arguments setting to no scan the generated tags file, can enter in an infinite loop.

Configuration

To configure your tags building you can write a .ctags (or the file in your g:rebtags_ctags_config_file variable) configuration file with one ctags parameter per line in the root directory of your project.

g:rebtags_root_markers

Use this to set your own root markers as replacement to the default ones (.git, .hg, .svn, .bzr, _darcs and .ctags):

let g:rebtags_root_markers = ['.git', '.project']

g:rebtags_ctags_command

Use this to define which ctags command you want to use (the default one is ctags):

let g:rebtags_ctags_command = 'ectags'

g:rebtags_ctags_config_file

Use this to define which filename has the ctags configuration (the default one is .ctags):

let g:rebtags_ctags_config_file = '.project_ctags'

g:rebtags_extra_arguments

Use this to define extra parameters to your ctags command (the default value is no extra parameters):

let g:rebtags_extra_arguments = '--python-kinds --languages=python'

g:rebtags_auto_add_project_tags

Use this to define enable or disable the automatically add of the generated tags file to the tags setting of the vim (the default value is 1):

let g:rebtags_auto_add_project_tags = 0

Usage

To rebuild your tags you have to run the command :RebuildTags

You can map it as usual, for example:

map <F6> <Esc>:RebuildTags<CR>

License

This plugin is placed in the public domain.

Contributing

If you experience any bugs or have feature requests, please open an issue on GitHub. Fork the source repository on GitHub and send a pull request if you have any code improvements.