On 14/4/13 at 01:55, [email protected] (jh) wrote:

I'd like to be able to run a filter on the document I'm working on.

Save the script/filter in
"~/Library/Application Support/BBEdit/Text Filters/"

Open the Text Filters palette from the Window menu.

Optionally set a key short-cut for the script

The filter will operate on selected text in the front document (whether saved or not) or, if there is no selection, on the whole text.

Here's an example of a Perl text filter:

#!/usr/bin/perl
while (<>) { # read the document/selection line by line
  s/a/A/g; # change all 'a' to 'A'
  print; # replace the line with the modified line
}

# JD

--
--
You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to