perl-support.vim   –   Perl IDE  –   Screen Shots    



   

Perl plugin
root menu
( version 5.3.2 )

             screen shots: gVim + plugins as Perl-IDE

screen shots: Regular Expression Tester

Read the perl-support.vim help file

The key mappings of this plugin (PDF)

• Plugin featured in the The Geek Stuff article
Make Vim as Your Perl IDE Using perl-support.vim Plugin
             Similar plugins:
Bash-IDE   bash-support
C/C++-IDE  c-support
Lua-IDE      lua-support
Vim Script IDE    Vim Support


Menu Structure

Submenus (1. level)

Submenus (2. level)

Generated Code

Menu Comments

    

Menu Comments : Different types of comments, file header, commenting and uncommenting of marked areas etc.


The menu entry File Header generates a complete file header. File name and the date are looked up by the editor. The other information (author name, sign, ... ) are taken from the configuration settings in the plugin.
#!/usr/bin/perl 
#===============================================================================
#
#         FILE: test.pl
#
#        USAGE: ./test.pl  
#
#  DESCRIPTION: 
#
#      OPTIONS: ---
# REQUIREMENTS: ---
#         BUGS: ---
#        NOTES: ---
#       AUTHOR: Dr. Fritz Mehner (fgm), mehner.fritz@web.de
# ORGANIZATION: FH Südwestfalen, Iserlohn
#      VERSION: 1.0
#      CREATED: 09.04.2012 12:30:45
#     REVISION: ---
#===============================================================================

use strict;
use warnings;
use utf8;



This header is generated from the template file below. This template file is created by the user; the tags are replaced when the file is read in.
#!/usr/bin/perl
#===============================================================================
#
#         FILE: |FILENAME|
#
#        USAGE: ./|FILENAME|
#
#  DESCRIPTION: <CURSOR>
#
#      OPTIONS: ---
# REQUIREMENTS: ---
#         BUGS: ---
#        NOTES: ---
#       AUTHOR: |AUTHOR| (|AUTHORREF|), |EMAIL|
# ORGANIZATION: |ORGANIZATION|
#      VERSION: 1.0
#      CREATED: |DATE| |TIME|
#     REVISION: ---
#===============================================================================

use strict;
use warnings;
use utf8;


The entry KEYWORD: -> TODO generates a special line end comment. These comments are easily located by their key words (e.g. :TODO: ). Date and author name are inserted by the editor.
# :TODO      :09.04.2012 12:37:47:fgm:
These comments are not for the final version of a script, of course.

TOP

Menu Statements

 

Menu Statements : Perl statements and code snippet support


In normal and insert mode the entry foreach generates an empty foreach-loop . The cursor will be positioned after the $.

foreach my $| (  )
{
}



If the entry foreach is chosen for a marked block (visual mode) this block is surrounded by a foreach-loop:
print "This is $i\n";
Result:
foreach my $i (  )
{
  print "This is $i\n";
}

TOP

Menu Idioms

 

Menu Idioms : Insert frequently used statements and code snippets


The entry subroutine asks for the name of the subroutine (here: sub1) and generates the following lines:

sub sub1 {
    my  ( $par1 )   = @_;
    return ;
} ## --- end sub sub1

TOP

Menu Snippets

 

Menu Snippets : handle code snippets and templates


Read the help file for more informations about snippets and templates.

TOP

Menu Regex

Compose regular expressions with a few mouse clicks.

Instead of typing in regex tokens directly, just pick what you want from the menus.

Explain a regular expressions using .

If the Perl module YAPE::Regex::Explain is installed a regular expression can be explained to you. Just mark the expression (v-mode) and use the menu entry 'explain regex' or the hotkey '\xe' :

Regular expression tester.

If you have a Vim binary with Perl interface compiled in you can test regular expressions very easily.
Pick up a regular expression by selecting the appropriate string (v-mode; e.g. inside or with the complete m// operator) and use the menu entry 'pick up regex'. Pick up flags the same way with 'pick up flags'. Now pick up a string as target with 'pick up string' and select the menu entry 'match'. The regular expression, the target and the match are shown in a new window called REGEX-TEST :



Multiline regular expressions are allowed. They work properly if the flag 'x' is set. Multiline strings are also allowed.



Match several regular expressions with several targets: Multiline strings are also allowed.



List all matches using the modifier 'g': Multiline strings are also allowed.



Test a regular expression with embedded code: Multiline strings are also allowed.



See the help file for more options and features.

TOP

Menu File-Tests

 

Insert file tests

Menu Spec-Var

Insert special variables.

Menu POD

Compose and check plain old documents.

Compose PODs by inserting empty statements from the menu.

Run a module or a POD file through podchecker. Displays warnings and errors in a quickfix error window:

   (81 KB)

TOP

Menu Profiling

Run a profiler: Devel::SmallProf, Devel::FastProf, Devel::NYTProf

The profiler reports will be opened in a quickfix buffer:

   (81 KB)

TOP

Menu Run

 

Menu Run :
Run script, check syntax, start debugger,
read Perl documentation,
run perlcritic, run perltidy,
make hardcopy, redirect output

Run script or check or syntax. In case of errors an error window will be opened to show the current list of errors:

   (51 KB)

The Perl documentation can be read for the word under the cursor by typing Shift-F1. If the list of all installed Perl modules is already generated this list can be shown by 'show installed Perl modules'. From this list an entry can be chosen by Shift-F1. The man page will be shown now in a help window:

   (134 KB)

Navigate through PODs with an addition to the taglist -plugin (based on Exuberant Ctags ) :

   (124 KB)

Optional: Run perlcritic for the current buffer (search for 'Perl::Critic' or 'perlcritic' on CPAN to get the latest version ) :

   (124 KB)

Menu help

Read Perl documentation and plugin help

TOP

back to Sourceforge


Page created: September 25 2014   /   Mail to: F.Mehner