Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Vim for Perl developers

by jacques (Priest)
on May 13, 2003 at 15:56 UTC ( [id://257797]=note: print w/replies, xml ) Need Help??


in reply to Vim for Perl developers

That's great work. But I am wondering if you could help answer a vim question I have. How would I specify a Perl script to execute with the interpreter? I am not talking about doing:   <ESC>:! perl script.pl

What I would like to do is access the Perl interpreter from within vim. With ruby, one can use the rubyfile command. From vim's command mode, you could type  :rubyfile example.rb to execute a ruby script. But how would you do this with Perl?

Replies are listed 'Best First'.
Re: Re: Vim for Perl developers
by TVSET (Chaplain) on May 13, 2003 at 17:37 UTC
    That's great work.

    Thanks :)

    What I would like to do is access the Perl interpreter from within vim. With ruby, one can use the rubyfile command. From vim's command mode, you could type :rubyfile example.rb to execute a ruby script. But how would you do this with Perl?

    I've got rather limited experience in this area, but maybe :help perldo will help you. I guess you'll need to have Vim compiled with perl support.

    Leonid Mamtchenkov aka TVSET

      Thanks, but perldo is a range command, so that won't work.
        :perl do "filename.pl"

        :perl lets you do arbitrary expressions.
        ---Iain.
Re: Re: Vim for Perl developers
by naChoZ (Curate) on Jun 06, 2003 at 18:47 UTC
    I wonder if you would find this useful. In .vimrc put:

    au BufWritePost *.pl,*.pm !perl -c %

    Every time you save a .pl or .pm file, it executes perl -c and shows you the output.

    ~~
    naChoZ

      Better would probably be something like:
      au BufWritePost *.pl,*.pm !perl -wcIlib %
      Warnings are important. -Ilib is probably also important, but maybe only I do editing in the root directory of my projects.

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://257797]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found