[Za-pm] Re: Perl Source Code Formatter

Spike spikeh at mweb.co.za
Mon Jun 2 00:48:13 CDT 2003


In vi (or at least in vim) you can select visual mode <esc.> v    blockmark 
your code and then type an = sign - and it will do quite a good job of 
formatting the whole lot.

To make it pretty in vi I would also suggest that you use (or put in your 
.vimrc file) :-

set expandtab   (makes tabs real spaces so it still looks cool in other 
editors)
set sw=3          (sets the shift width)
set ts =3           (sets the tab to 3 spaces)

With the ts and sw set to the default the code  goes of the side of the 
screen after a few nested ifs!

Try set syntax=perl too. The perl syntax highlighting is not had for HTML etc.





At 2003/05/31 07:00 PM, you wrote:
>Send Za-pm mailing list submissions to
>         za-pm at mail.pm.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>         http://mail.pm.org/mailman/listinfo/za-pm
>or, via email, send a message with subject or body 'help' to
>         za-pm-request at mail.pm.org
>
>You can reach the person managing the list at
>         za-pm-admin at mail.pm.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Za-pm digest..."
>
>
>Today's Topics:
>
>    1. Re: books (Nico Coetzee)
>    2. Perl Source Code Formatter (Rory Austin)
>    3. Re: Perl Source Code Formatter (Nico Coetzee)
>
>--__--__--
>
>Message: 1
>From: Nico Coetzee <nico at itfirms.co.za>
>Organization: ITFirms.co.za
>To: za-pm at mail.pm.org
>Subject: Re: [Za-pm] books
>Date: Fri, 30 May 2003 19:33:25 +0200
>
>I have never paid customs duty - even when the total value exceeded R1000 -
>personally I don't knoe if it should be an automatic thing, or do the customs
>trust you to fill in some form? I honestly don't know, and every person you
>ask has a different story :-|
>
>Anyway - I read the the story on the two URL's, and I must say, I havn't
>experienced anything like they describe. I order books - ussually from
>Amazon.com - and within two to three weeks I get the postoffice note. I then
>go pick up the books, and that's it. My average order is well in excess of
>$40 ( or R400 ), so I really don't know...
>
>Weird how these import stuff works - but for me, it's still a mystery.
>
>On Friday 30 May 2003 08:03, Sean Carte wrote:
> > On Thu, 2003-05-29 at 08:37, Spike wrote:
> > > Also at a value of $4.50 there was no customs hassle (which can be a
> > > problem with Amazon orders).
> >
> > Is it true that there is no customs duty on items that cost less than
> > R400?
> >
> > <http://www.mbendi.co.za/import/sa/customs_tariffs.htm> and
> > <http://www.dhl.co.za/about/imports.html>
> >
> > I assume that that includes shipping, and is worked out at the exchange
> > rate applicable on the day that the item crosses paths with customs?
>
>--
>Nico Coetzee
>
>http://www.itfirms.co.za/
>http://za.pm.org/
>http://forums.databasejournal.com/
>
>To the systems programmer, users and applications serve only to provide a
>test load.
>
>
>--__--__--
>
>Message: 2
>Date: Sat, 31 May 2003 15:06:41 +0200
>To: za-pm at mail.pm.org
>From: Rory Austin <rory at radv2.za.net>
>Subject: [Za-pm] Perl Source Code Formatter
>
>Hi
>
>I'm looking for a tool to indent my code for me... 1000+ lines. Preferably
>one that uses STDIN and STDOUT so I can easily integrate with an IDE.
>
>Can any of you recommend any? Or have you got a perl script to do it?
>
>Thanks,
>Rory
>
>
>--__--__--
>
>Message: 3
>From: Nico Coetzee <nico at itfirms.co.za>
>Organization: ITFirms.co.za
>To: za-pm at mail.pm.org
>Subject: Re: [Za-pm] Perl Source Code Formatter
>Date: Sat, 31 May 2003 17:55:23 +0200
>
>http://search.cpan.org/author/SHANCOCK/Perl-Tidy-20021130/bin/perltidy
>
>On Saturday 31 May 2003 15:06, Rory Austin wrote:
> > Hi
> >
> > I'm looking for a tool to indent my code for me... 1000+ lines. Preferably
> > one that uses STDIN and STDOUT so I can easily integrate with an IDE.
> >
> > Can any of you recommend any? Or have you got a perl script to do it?
> >
> > Thanks,
> > Rory
> >
> > _______________________________________________
> > Za-pm mailing list
> > Za-pm at mail.pm.org
> > http://mail.pm.org/mailman/listinfo/za-pm
>
>--
>Nico Coetzee
>
>http://www.itfirms.co.za/
>http://za.pm.org/
>http://forums.databasejournal.com/
>
>To the systems programmer, users and applications serve only to provide a
>test load.
>
>
>
>--__--__--
>
>_______________________________________________
>Za-pm mailing list
>Za-pm at mail.pm.org
>http://mail.pm.org/mailman/listinfo/za-pm
>
>
>End of Za-pm Digest


Spike Hodge

UNIX Programmer
M-Web Technology
021 596 8496
082 901 5265

Click here and make M-Web your homepage
http://homepage.mweb.co.za 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/za-pm/attachments/20030602/14f678f4/attachment.htm


More information about the Za-pm mailing list