sponsor Vim development Vim logo Vim Book Ad

perlhelp.vim : Interface to perldoc

 script karma  Rating 18/6, Downloaded by 1548    Comments, bugs, improvements  Vim wiki

created by
Lorance Stinson
 
script type
utility
 
description
A plugin that provides quick and easy access to perldoc. The perldoc text is displayed in a new window. This window is reused for resulting lookups if left open. When looking up a module filetype is set to perl so it is correctly highlighted, if syntax highlighting is turned on.

Functions:
The functions can accept an argument for the topic to lookup. If no argument is supplied they will prompt for the topic.
PerlFAQ - Lookup a regular expression using perldoc -q.
PerlHelp - Lookup a topic using perldoc.
PerlFunc - Lookup a function using perldoc -f.
PerlMod - Lookup a module using perldoc -m.
PerlVar - Lookup a Perl builtin variable in the perlvar page.

Key Mappings:
<Leader>ph - Lookup the selected text in visual mode or the word under the cursor in normal mode using perldoc.
<Leader>PH - Prompt for a topic to lookup using perldoc.
<Leader>pf - Lookup the selected text in visual mode or the word under the cursor in normal mode using perldoc -f.
<Leader>PF - Prompt for a function to lookup using perldoc -f.
<Leader>pm - Lookup the selected text in visual mode or the word under the cursor in normal mode using perldoc -m.
<Leader>PM - Prompt for a module to display using perldoc -m.
<Leader>pq - Lookup the selected text in visual mode or the word under the cursor in normal mode using perldoc -q.
<Leader>PQ - Prompt for a regular expression to lookup using perldoc -q.
<Leader>pv - Lookup the selected text in visual mode or the word under the cursor in normal mode in the perlvar page.
<Leader>PV - Prompt for a Perl builtin variable and look it up in the perlvar page.

The <Leader> key is normally '\'. Thus to lookup the word under the cursor type '\ph'.

Tip:
Adding the following to your vimrc file will make POD documentation in Perl modules easier to read:
let perl_include_pod=1

If you find any problems or have any suggestions please feel free to email me at LoranceStinson+perlhelp AT gmail DOT com.

Also available at http://lorance.freeshell.org/perlhelp/
 
install details
Unzip the file in your .vim directory.

Update your help tags to install the help text. ":helptags ~/.vim/doc/" should do it
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
perlhelp.zip 1.5 2007-06-25 6.0 Lorance Stinson *Added lookup of Perl builtin variables via \pv and PerlVar.
*Now loads default topics when no topic is provided.
perlhelp.zip 1.4 2007-06-22 6.0 Lorance Stinson When lookup up a function strip everything up to, and including, '->'.  This will make methods be looked up instead of the object the method is called from.
perlhelp.zip 1.3 2007-06-15 6.0 Lorance Stinson * Enhanced the handling of module and general help topic lookup.
* Set the file type to man when looking up general perl help topics.
perlhelp.zip 1.2 2007-06-14 6.0 Lorance Stinson Removed 'setlocal iskeyword+=:' and used <cWORD> and a substitution as suggested by Erik Falor.
perlhelp.zip 1.1 2007-06-13 6.0 Lorance Stinson Added 'setlocal iskeyword+=:' to account for :'s in module names.
perlhelp.zip 1.0 2007-06-04 6.0 Lorance Stinson Initial upload
ip used for rating: 54.226.235.222

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo