tagfinder.vim : A simple vim plugin to look for tags of specific kinds: classes, functions, etc.
| script karma
Downloaded by 1235
Comments, bugs, improvements
script versions (upload new version)
|The purpose of this plugin is to enable searching for classes, functions or any
other language structures by their name. It expects a tag file generated by
using exuberant ctags. It's very similar to the built-in ":tag" command, but
with the added bonus of filtering tags by their type.
Defining a global command to look for a class by its name would look like this:
:DefineTagFinder Class c,class
After this command is invoked, you can execute the `Class` command with a tag
name, which will send you to the class if it's unique, or load the entries in
the quickfix window and let you choose between them.
Even more conveniently, the newly defined command will have tab-completion with
the tag names, so you don't have to type it all in and you can see a useful
overview of the matching classes (or functions, modules, vim commands...).
Since different file types have different tag definitions, you can override
commands per buffer by placing `DefineLocalTagFinder` invocations in filetype
plugins, or by using autocommands:
" in ftplugin/ruby.vim
DefineLocalTagFinder Method f,method
" in .vimrc
autocommand FileType java DefineTagFinder Method m,method
Note that the plugin comes with no predefined commands at all. My personal
preference is to call them "Class", "Function" and so on, but you might prefer
to use "FindClass" and "FindFunction" instead. The plugin simply provides the
defining command. For more information on installation and usage, please take a
look at the doc file.
|There are several ways to install the plugin. The recommended one is by using
Tim Pope's pathogen (http://www.vim.org/scripts/script.php?script_id=2332). In
that case, you can clone the plugin's git repository like so:
git clone git://github.com/AndrewRadev/tagfinder.vim.git ~/.vim/bundle/tagfinder
If your vim configuration is under git version control, you could also set up
the repository as a submodule, which would allow you to update more easily.
The command is (provided you're in ~/.vim):
git submodule add git://github.com/AndrewRadev/tagfinder.vim.git bundle/tagfinder
Another way is to simply copy all the essential directories inside the ~.vim/
directory: autoload, doc, plugin.
Click on the package to download.
ip used for rating: 22.214.171.124