PerlHelp

A plugin for the VIM text editor that provides quick and easy access to perldoc. The perldoc text is displayed in a new window. This window is reused for subsequent 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 using perldoc perlvar.

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 using perldoc perlvar.
<Leader>PV
Prompt for a Perl builtin variable and look it up using perldoc perlvar.

Installation:

  1. Unzip the file perlhelp.zip in your .vim directory.
  2. Optionall update your help tags. Help on the functions and plugin will not be available until this is done. Typing ":helptags ~/.vim/doc/" while in VIM should do it.

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

It is available as PKZip.
Also on vim.org, script # 1913.
Last updated 2007-06-15. Version 1.3.

Changes:

  • 1.5 2007-06-22:
    • Added lookup of Perl builtin variables via \pv and PerlVar.
    • Now loads default topics when no topic is provided.
  • 1.4 2007-06-22:
    • 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.
  • 1.3 2007-06-15:
    • Enhanced the handling of module and general help topic lookup.
    • Set the file type to man when looking up general perl help topics.
  • 1.2 2007-06-14:
    • Removed 'setlocal iskeyword+=:' and used <cWORD> and a substitution as suggested by Erik Falor.
  • 1.1 2007-06-13:
    • Added 'setlocal iskeyword+=:' to account for :'s in module names.

Back

Created with VIM. Valid HTML 4.01 Transitional.