Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
If you haven't seen Devel::PerlySense, I highly recommend that you check it out. It's a relatively new project by Johan Lindström to bring Intellisense functionality to Perl.
In your
filetype plugin on
In your
if exists( "b:perlysense" )
finish
endif
let b:perlysense = 1
map <silent> <Leader>pp:call PerlySense_POD()<cr>
map <silent> <Leader>pg:call PerlySense_smart_go_to()<cr>
function! PerlySense_POD()
call GetPos()
let command="perly_sense smart_doc --file=" . b:file." --row=".b:row." --col=".b:col
echo system(command)
endfunction
function! PerlySense_smart_go_to()
call GetPos()
let command="perly_sense smart_go_to --file=" . b:file." --row=".b:row." --col=".b:col
let result = split( system(command), "\t" )
let file = result[0]
execute "e " . file
endfunction
function! GetPos()
let b:file = bufname("%")
let b:row = line(".")
let b:col = col(".")
endfunction
Position your cursor on next and type \pp (replace the backslash with your leader character (see
found method name next docType hint
METHODS
Instance Methods
"next"
my $parser = TAP::Parser->new( { source => $file } );
while ( my $result = $parser->next ) {
print $result->as_string, "\n";
}
This method returns the results of the parsing, one result at a time.
Note that it is destructive. You can't rewind and examine previous
results.
If callbacks are used, they will be issued before this call returns.
Each result returned is a subclass of TAP::Parser::Result. See that
module and related classes for more information on how to use them.
Pretty nifty, eh? Note that this is a snippet of perldoc from a completely different file. Perlysense just knew where to look for it.
Also with the above code, if you position your cursor on a package name and type \pg, vim will automatically edit the correct file. It works, but I get strange error message about "Cannot redefine function PerlySense_smart_go_to, it is already in use". You can eliminate by removing the "!" after function. Makes it a bit tougher for developing this plugin, but it should work for you
PerlySense has the limitation that Perl is a dynamic language, of course, but so far it looks pretty sweet. It also does not yet have the much of an idea of a current project and the interface is still evolving, but so far this looks like a fantastic tool to help us get IDE style integration with our editor of choice.
It's worth noting that there's a heck of a lot more in PerlySense than just documentation. I'll try and post more if I get time. Suggestions for improving my vim code welcome. Some refactoring will be obvious as this grows, but some will simply be my not understanding vim programming terribly well.
PerlySense vs Omnicompletion (Score:1)
http://www.perlmonks.org/?node_id=621766 [perlmonks.org]
Does PerlySense complement or compete with that approach?
(Of course, if you are stuck on machines that have older vims that aren't easily upgradeable, then PerlySense would be the way to go.)
Re: (Score:2)
I'm really not sure. Johan's going to be away for a bit, so I can't ask him.
On a related note, I've discovered that using tab completion was very painful as it would often do a full scan over everything in @INC. I added this to my .vimrc and now it just scans what's in buffers (thanks to smylers for help on this):
Re: (Score:1)
Right now, PerlySense does have a good idea of what the current class looks like (i.e. $self), but not so good idea of the environment, because there is still no @INC-wide or project-wide repository of "things".
Whenever completions is implemented, Omnicompletion could potentially start
Names and keys (Score:1)
Because it isn't just POD. Docs could be POD, but also other things that shed light on how to use a method, like the method signature deduced from the source, or an example $self->method_call($param1, $param2) taken from the source. Or something else.
So the key stroke should also not be "p" for POD, but rather "g" or "G". I'll write up the conventions for key strokes/binding