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

Re: [MacPerl] Commenting blocks of code



BBEdit provides an Un/Comment command in its Tools menu -- at least in version
5.1.  That's what I use and find it very convenient.  It also provides an
Un/Comment Settings command to let you specify the comment marker for each
type of programming language.

For features not supported in the Tools menu, you can easily add them by
dropping a script in BBEdit's Perl Filters folder.  For example, this one
chops the first four spaces from a line:

#!perl -p
# remove 4 spaces at start of line

s/^\s{4}//;

--Matt






"Paul N. Schatz" wrote:

>         Someone must have written an AppleScript or MacPerl script or some
> such that permits one to select a block of lines of MacPerl code in a
> window and automatically comment them out or vice versa.  Can someone point
> me in the right direction?
>
>         Paul
> --
> Paul Schatz
> Chem Dept
> University of Virginia
>
> # ===== Want to unsubscribe from this list?
> # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org


# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org