Vim::Tag - Generate perl tags for vim
package Foo::Bar; use Vim::Tag 'make_tag'; make_tag $tag, $filename, $line;
then:
$ ptags --use ~/code/coderepos | ptags_sort >~/.ptags
.vimrc:
set tags+=~/.ptags
then this works in vim:
:ta Foo::Bar :ta my_subroutine
bash completion:
alias vit='vi -t' _ptags() { COMPREPLY=( $(grep -h ^${COMP_WORDS[COMP_CWORD]} ~/.ptags | cut -f 1) ) return 0 } complete -F _ptags vit
then you can do:
$ vit Foo::Bar $ vit Foo--Bar # easier to complete on than double-colons $ vit my_subroutine
Manage tags for perl code in vim, with ideas on integrating tags with the bash programmable completion project. See the synopsis.
Nothing is exported automatically. The function can be exported using its name or the :all tag.
:all
Takes a tag name, a filename and a line number. If the global variable $::PTAGS is set, it prints a tag line that vim can understand. The ptags program will set $::PTAGS when going through the modules to give them a chance to generate their own tags.
$::PTAGS
ptags
No bugs have been reported.
Please report any bugs or feature requests through the web interface at http://rt.cpan.org.
See perlmodinstall for information and options on installing Perl modules.
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you. Or see <http://www.perl.com/CPAN/authors/id/M/MA/MARCEL/>.
Marcel Grünauer, <marcel@cpan.org>
<marcel@cpan.org>
Copyright 2008 by Marcel Grünauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Vim::Tag, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Vim::Tag
CPAN shell
perl -MCPAN -e shell install Vim::Tag
For more information on module installation, please visit the detailed CPAN module installation guide.