Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
You might find info in this snippet, this script and this more descriptive node useful.

My personal contribution is:
:map \# ^[I#!/usr/bin/perl -w^Muse strict;^M
update
I have been using Vim with embedded Perl for a while.
I don't think I am exploiting all the possibilities, but it is really helpful to have perl regular expressions at your disposal, so you don't have to think about the differences between the two RegEx dialects. Once you are used to Perl's syntax, capturing parentheses in Vim  \(.*\) look painfully unfamiliar.
I often use Perl's sort to manipulate my lines of text.

A nice feature is that you can test one or more lines of code, while you are writing them. Here is just one example:
# line 10 of your code $a = sqrt(64);
If you want to see the result of that assignment (provided that your internal CPU can't calculate it :) this command
:10perldo s/$/$_/ee
will append the result at the end of the line.
I mapped this command, referring to the current line.
:map _ee ^[:.,.perldo s/$/$_/ee^M
I am sure that there is a lot more than these few tricks. Having Perl embedded in your editor can trigger your imagination!
 _  _ _  _  
(_|| | |(_|><
 _|   

In reply to Re: Perl Editor Voodoo by gmax
in thread Perl Editor Voodoo by vroom

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-19 20:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found