Hello,

I work with very large log files and I would like to work on their 
formatting a bit.  I open up the a folder and then there are several other 
folders inside of it.  So I drag the main folder to the BBEdit icon and 
open it up as a project.  The main files I'm interested in are xyz.log, 
then xyz.log.1, xyz.log.2 (and so on to 48), but there are a few other 
files that I have to look at as well all in various folders in the project.

I have the language set to automatically apply as XML to xyz.log.  I 
couldn't get it to apply to xyz.log.1 .2 etc with a wildcard, so I just had 
to add .log.1 .log.2 etc for the language preferences.  No big deal. 
 However, it only seems to Soft Wrap xyz.log and when I do a multi file 
search, if I hit something on xyz.log.1 it does not soft wrap; and my 
engineers decided that text that spans 1000 characters long before wrapping 
is somehow a good idea.

Beyond this, I'm trying to automate a search and replace for a simple 
string but I guess I can't get the escape characters correct.
I have to deal with a lot of tags like 
<blah>value</blah><blah2>value2</blah2><blah3>value3</blah3>
I found that an amazing simple search and replace where I replace "><" with 
">\r<" results in
<blah>value</blah>
<blah2>value2</blah2>
<blah3>value3</blah3>

It's amazing, and with the amount of data I have to read, a replace like 
this (and a soft wrap) makes so much difference in the amount of time it 
takes to go through these files.

I just can't get these either automated or mapped to a button (like to 
execute an apple script) that applies to all files in a project.

If I can just figure out what's wrong with the preferences to allow the xml 
formatting with the softwrap to actually apply to all files in the project, 
that'd be awesome.  Otherwise, can I programmatically do this?

I found a softwap that seems to work in AppleScript

*{{{*

*tell* *application* "BBEdit"

*     set* project *to* *project document* 1

*     tell* project

*          if* *not* (soft wrap text) *then*

*         set* soft wrap text *to* true

*         set* soft wrap mode *to* window width

*         set* show page guide *to* false

*     else*

*         set* soft wrap text *to* false

*         end* *if*

*     end* *tell*
*end* *tell* 
}}}

But this does not apply to all items in a project.  

So is there any way to either fix my preferences to do the softwrap for the 
project or create an applescript that will both soft wrap to the window 
width as well as search and replace >< with >\r< automatically or where I 
can at least bind it to a key?

Thanks

-- 
This is the BBEdit Talk public discussion group. 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].
To post to this group, send email to [email protected].

Reply via email to