[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Perl Tutorial



 > First, apologies if I've started a minor bush fire.
> 
> One of the neat things in the dzsoft Perl editor in the tutorial is
> the ability to test run your script from within the editor. I have
> Emacs on my mac and have used Vim under Ubuntu, both are good text
> editors with syntax highlighting, but I couldn't find a way to test
> the scripts in this way. I guess there may not be anything similar as
> I have failed to turn it up with Google.
> 

There's a couple of ways it can be done with Vim; first by typing
":!<scriptname.pl>" you can run the script, then for subsequent invocations
you can just do :!! (run last external command).

Alternatively, set up the ':make' command to run it, and have errors picked
up as defined by the errorformat variable. Now I'm sure someone has done
this for perl, but I'm not a big perl hacker, so never looked. Until now,
and found this[1] :-)

The third way is have two xterms, one with editor, one at a command prompt
and switch between the two :-)

Chris...
[1] http://vim.sourceforge.net/scripts/script.php?script_id=556

-- 
\ Chris Johnson                 \
 \ cej@xxxxxxxxxxxxxxxx          \ Quidquid latin dictum sit altum viditur
  \ http://cej.nightwolf.org.uk/  \
   \ http://redclaw.org.uk/        ~--------------------------------------



_______________________________________________
        Sheffield Linux User's Group
  http://www.sheflug.org.uk/mailfaq.html
 GNU - The choice of a complete generation