Re: How to Process a GROUP of Lines Containing . . .

2017-02-25 Thread Oliver Boermans
Hi Bill,

In BBEdit I would first reformat the XML:

Markup > Utilities > Format

Select *Mode: Compact* to put all the code on one line.

Then search 
and replace with \n

 So now each  tag is on one line.

This will make the “per line” tools more useful.

Once you are done sorting you could revisit Format.

Cheers
Ollie


On 25 February 2017 at 18:06, Bill Kochman  wrote:

> Hello Patrick,
>
> Thanks for the suggestion. I will try the “Extract” option the next time
> that I have to perform a task like that.
>
> As is, I went ahead and purchased Sheila Dixon’s “Integrity Plus”, which
> is the commercial version of “Integrity”. Aside from proving to be an
> excellent website link checker, it also generates sitemaps, and allows the
> user to set update frequency and priority lives for individual files, or
> even for whole directories of files. And it has other nice features.
>
> Kind regards,
>
> Bill K.
>
> > On Feb 25, 2017, at 1:06 AM, Patrick Woolsey 
> wrote:
> >
> > By design, BBEdit's line processing commands target whole lines only
> since processing partial and/or blocks of lines is (in general) quite a bit
> more complicated.
> >
> > Instead, I recommend you try the "Extract" command (which is tailor-made
> for just this sort of task :-) and you can configure & apply this command
> in the Find or Multi-File Search windows or invoke it directly via Search
> -> Extract.
> >
> >
> > Regards,
> >
> > Patrick Woolsey
>
> --
> This is the BBEdit Talk public discussion group. If you have a
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: 
> ---
> 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 bbedit+unsubscr...@googlegroups.com.
> To post to this group, send email to bbedit@googlegroups.com.
> Visit this group at https://groups.google.com/group/bbedit.
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: How to Process a GROUP of Lines Containing . . .

2017-02-25 Thread Bill Kochman
Hello Ollie,

Thank you for taking the time to reply.

As I told Patrick earlier today, I already resolved the issue by purchasing a 
copy of Sheila Dixon’s excellent “integrity Plus” app.

While that issue is now taken care of, I will definitely keep your message 
archived here, and your point in mind, for any future tasks where it may come 
in handy.

Thanks again.

Kind regards,

Bill K.


> On Feb 25, 2017, at 8:23 PM, Oliver Boermans  wrote:
> 
> Hi Bill,
> 
> In BBEdit I would first reformat the XML:
> 
> Markup > Utilities > Format 
> 
> Select *Mode: Compact* to put all the code on one line.
> 
> Then search 
> and replace with \n
> 
>  So now each  tag is on one line.
> 
> This will make the “per line” tools more useful.
> 
> Once you are done sorting you could revisit Format.
> 
> Cheers
> Ollie

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Highlight colour in differences windows?

2017-02-25 Thread jgill
Word 2016 for Mac can't display the differences between two documents so I 
have taken two 75,000 word documents as text files into BBEdit were I can 
see the differences between the two documents and have synchronised 
scrolling between them. So far, so good. The problem is that the 
differences are highlighted in a very pale grey and I would like to make 
the highlight colour more obvious. Nothing in the Color Preferences seems 
to affect this highlight colour even though the documentation suggests that 
it does. Is there a hidden preference for this somewhere?

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Highlight colour in differences windows?

2017-02-25 Thread Herbert Schulz

> On Feb 25, 2017, at 9:42 AM, jgill  wrote:
> 
> Word 2016 for Mac can't display the differences between two documents so I 
> have taken two 75,000 word documents as text files into BBEdit were I can see 
> the differences between the two documents and have synchronised scrolling 
> between them. So far, so good. The problem is that the differences are 
> highlighted in a very pale grey and I would like to make the highlight colour 
> more obvious. Nothing in the Color Preferences seems to affect this highlight 
> colour even though the documentation suggests that it does. Is there a hidden 
> preference for this somewhere?
> 

Howdy,

That's most likely because the difference file pane, at the bottom, is selected 
and therefore the two file panes show selections in gray.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Highlight colour in differences windows?

2017-02-25 Thread jgill
It seems that I have been misundertanding how this works. The two 
difference windows have lines with very pale grey backgrounds. I don't 
understand why. If I select a line 'Nonmatching Lines...' in the bottom 
pane, I can see the highlighted differences (in magenta), which is what I 
want and I can scroll through them with the up/down arrow keys. I was 
expecting ALL the differences to be highlighted without doing anything.

So, what are these pale grey backgrounds to some lines, alternate 
paragraphs???

On Saturday, February 25, 2017 at 3:42:50 PM UTC, jgill wrote:
>
> Word 2016 for Mac can't display the differences between two documents so I 
> have taken two 75,000 word documents as text files into BBEdit were I can 
> see the differences between the two documents and have synchronised 
> scrolling between them. So far, so good. The problem is that the 
> differences are highlighted in a very pale grey and I would like to make 
> the highlight colour more obvious. Nothing in the Color Preferences seems 
> to affect this highlight colour even though the documentation suggests that 
> it does. Is there a hidden preference for this somewhere?
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Customer post: How to quickly create html form-fields via grep search & replace

2017-02-25 Thread Rick Yentzer
That was really helpful. If also gives ideas for other ways to use grep and 
replace together in html and the like.


On Thursday, February 23, 2017 at 2:53:14 PM UTC-5, Patrick Woolsey wrote:
>
> Good afternoon folks, 
>
> We just heard from a customer who's written a handy tutorial 
> about creating HTML form fields using BBEdit, so I'm posting a 
> link here for anyone who may find this helpful: 
>
> How to quickly create html form-fields using BBEdit’s GREP 
> search and replace function -- by Ole Kristian Ek Hornnes: 
>
> <
> https://tech.humlesite.eu/2017/02/21/how-to-quickly-create-html-form-fields-using-bbedits-grep-search-and-replace-function/>
>  
>
>
>
> Regards, 
>
>   Patrick Woolsey 
> == 
> Bare Bones Software, Inc.  
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Customer post: How to quickly create html form-fields via grep search & replace

2017-02-25 Thread Bruce Linde
here are some canned/stored grep patterns i use all the time... i have a 
bunch. all of the ones related to forms start with FORMS:, all of the one 
related to php start with PHP:, etc.



FORMS: generate radio buttons
   USAGE: any amount of field names, one per line. select all and then 
REPLACE ALL - selection only
   FIND: ^([^\r]+)\r
   REPLACE ALL:  Yes\r No\r\r

SUCH AS:
do i love bbedit?
could i imagine using any other program than bbedit?
where's my winning lottery ticket already?!?!?

WHICH RESULTS IN:

 Yes
 No

 Yes
 No

 Yes
 No





FORMS: init post vars from a list of field names
   USAGE: any amount of field names, one per line. select all and then 
REPLACE ALL - selection only
   FIND: ^([^\r]+)\r
   REPLACE ALL: \tif ( isset($_POST['\1']) ) {\r\t\t$\1 = 
$_POST['\1'];\r\t} else {\r\t\t$\1 = "";\r\t}\r\r

SUCH AS:
wombat
toaster_oven
lumbago

WHICH RESULTS IN:

if ( isset($_POST['wombat']) ) {
$wombat = $_POST['wombat'];
} else {
$wombat = "";
}

if ( isset($_POST['toaster_oven']) ) {
$toaster_oven = $_POST['toaster_oven'];
} else {
$toaster_oven = "";
}

if ( isset($_POST['lumbago']) ) {
$lumbago = $_POST['lumbago'];
} else {
$lumbago = "";
}






FORMS: init post AND session vars from a list of field names
   USAGE: any amount of field names, one per line. select all and then 
REPLACE ALL - selection only
   FIND: ^(.+)\r
   REPLACE ALL: \t$the_\1 = $_POST['\1'];\r\t\t$_SESSION['\1'] = \$the_\1;\r

SUCH AS:
wombat
toaster_oven
lumbago

WHICH RESULTS IN:

$the_wombat = $_POST['wombat'];
$_SESSION['wombat'] = $the_wombat;
$the_toaster_oven = $_POST['toaster_oven'];
$_SESSION['toaster_oven'] = $the_toaster_oven;
$the_lumbago = $_POST['lumbago'];
$_SESSION['lumbago'] = $the_lumbago;








On Thursday, February 23, 2017 at 11:53:14 AM UTC-8, Patrick Woolsey wrote:
>
> Good afternoon folks, 
>
> We just heard from a customer who's written a handy tutorial 
> about creating HTML form fields using BBEdit, so I'm posting a 
> link here for anyone who may find this helpful: 
>
> How to quickly create html form-fields using BBEdit’s GREP 
> search and replace function -- by Ole Kristian Ek Hornnes: 
>
> <
> https://tech.humlesite.eu/2017/02/21/how-to-quickly-create-html-form-fields-using-bbedits-grep-search-and-replace-function/>
>  
>
>
>
> Regards, 
>
>   Patrick Woolsey 
> == 
> Bare Bones Software, Inc.  
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.