Re: Delete to end of document script
On May 23, 2012, at 15:33, Lalock wrote: It seems like this should be easy, but everything I've tried has failed. I'm trying to do a find and replace, then delete from a given text point down to the end of the document. Here's my latest effort: ... set theStart to selection's characterOffset __ Hey There, Part of the problem is that you're not working from a selection. You don't have with selecting match in your find specification. Take a look at this and see if it's close to what you're trying to do. set theFile to alias Thor:Users:chris:test_directory:test.txt tell application BBEdit activate open theFile opening in new_window tell text of text document 1 replace °° using \\r options {search mode:literal, starting at top:true, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false} set find_results to find \\r@rule: options {search mode:grep, starting at top:false, wrap around:true, backwards:false, case sensitive:false, match words:false, extend selection:false} delete (characters (get characterOffset of (found object of find_results)) thru -1) end tell end tell -- Best Regards, Chris -- 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 bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com 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 supp...@barebones.com rather than posting to the group. Follow @bbedit on Twitter: http://www.twitter.com/bbedit
Coda 2 is nice, but no match for BBEdit
This is not strictly BBEdit related, but may be relevant to some HTML CSS coders here anyway. There was a lot of excitement around Coda 2 during the last days, and I gave into the hype and bought it today from the App Store at the reduced price, although I maintain all my sites in BBEdit. I was curious enough to spend 40 EUR. Long story short: It's a nice app. The GUI is beautiful, the reference docs are a welcome addition. But in terms of features - especially with regards to site management -, even Coda 2 doesn't hold a candle to BBEdit. Includes alone (which can be updated and fine-tuned using variables) are something I couldn't live/work without – Coda's snippets are not really an adequate replacement. Same goes for fine-tuned RegEx search/replace, collections, the markup editor, Process Lines containing etc. I would love to see a Transmit-style Sync site feature in BBEdit, but that's about the only feature I really need a third-party app for. I guess I will use Coda here and there for a small project, but for everything else, I'll stick with BBEdit. (All this is not supposed to badmouth a competitor, but it might save some people some money.) -- 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 bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com 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 supp...@barebones.com rather than posting to the group. Follow @bbedit on Twitter: http://www.twitter.com/bbedit
Re: Delete to end of document script
Your script worked perfectly, Chris! Thank you so much, and everyone else for the advice. And Fletcher, this script will have to run through about 50 text files a day that have been exported from a FMP database, so hands off is exactly what I wanted. Again, THANK YOU! You guys rock! On May 23, 9:10 pm, Christopher Stone listmeis...@suddenlink.net wrote: On May 23, 2012, at 15:33, Lalock wrote: It seems like this should be easy, but everything I've tried has failed. I'm trying to do a find and replace, then delete from a given text point down to the end of the document. Here's my latest effort: ... set theStart to selection's characterOffset __ Hey There, Part of the problem is that you're not working from a selection. You don't have with selecting match in your find specification. Take a look at this and see if it's close to what you're trying to do. set theFile to alias Thor:Users:chris:test_directory:test.txt tell application BBEdit activate open theFile opening in new_window tell text of text document 1 replace °° using \\r options {search mode:literal, starting at top:true, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false} set find_results to find \\r@rule: options {search mode:grep, starting at top:false, wrap around:true, backwards:false, case sensitive:false, match words:false, extend selection:false} delete (characters (get characterOffset of (found object of find_results)) thru -1) end tell end tell -- Best Regards, Chris -- 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 bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com 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 supp...@barebones.com rather than posting to the group. Follow @bbedit on Twitter: http://www.twitter.com/bbedit
Using a (Persistent Include) variable in several includes and site-wide?
Hello guys, I am maintaining several smaller, static web sites using BBEdit. I have defined fairly large chunks of HTML (page headers, footers, main and sub navigation etc.) as persistent includes, and I use variables to customize these. It's a simple, flexible setup. Now here are two problems/questions: - I'd like to use one variable in *several* includes on the same page - ie, I want to define eg #BB_TITLE#=Foo and use this in several includes (header, footer). Is this possible? How? - Same question for site-wide variables. It would be awesome if I could define a few variables somewhere (ie, not on page level) and have their values injected into all pages/persistent includes where that variable is used. Is there a way to do this client-side, using BBEdit, or would I have to do this server-side (eg via PHP)? Thanks in advance! -- 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 bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com 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 supp...@barebones.com rather than posting to the group. Follow @bbedit on Twitter: http://www.twitter.com/bbedit
Re: Coda 2 is nice, but no match for BBEdit
On May 24, 2012, at 4:20 AM, Martin Post wrote: This is not strictly BBEdit related, but may be relevant to some HTML CSS coders here anyway. There was a lot of excitement around Coda 2 during the last days, and I gave into the hype and bought it today from the App Store at the reduced price, although I maintain all my sites in BBEdit. I was curious enough to spend 40 EUR. Long story short: It's a nice app. The GUI is beautiful, the reference docs are a welcome addition. But in terms of features - especially with regards to site management -, even Coda 2 doesn't hold a candle to BBEdit. Includes alone (which can be updated and fine-tuned using variables) are something I couldn't live/work without – Coda's snippets are not really an adequate replacement. Same goes for fine-tuned RegEx search/replace, collections, the markup editor, Process Lines containing etc. I would love to see a Transmit-style Sync site feature in BBEdit, but that's about the only feature I really need a third-party app for. I guess I will use Coda here and there for a small project, but for everything else, I'll stick with BBEdit. (All this is not supposed to badmouth a competitor, but it might save some people some money.) -- I got confused and bought Capo instead. -- 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 bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com 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 supp...@barebones.com rather than posting to the group. Follow @bbedit on Twitter: http://www.twitter.com/bbedit
Re: Coda 2 is nice, but no match for BBEdit
On May 24, 2012, at 8:32 AM, Lee Hinde wrote: I got confused and bought Capo instead. Well Capo is undeniably better than BBEdit at helping you learn guitar solos. -Steve -- 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 bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com 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 supp...@barebones.com rather than posting to the group. Follow @bbedit on Twitter: http://www.twitter.com/bbedit
Re: GREP: Replace variable string with title case or leave unchanged?
Sorry about the delay in responding. Your explanation is really helpful. I'm under the gun right now to complete a project, but as soon as I'm done, I'll learn enough Perl to implement this. It's something I need to do anyway. Thanks so much for taking the time to go through it step-by-step. These real-world examples are the best way to learn a new language, IMHO. Maybe I'll learn enough to pay it forward! :) -- 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 bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com 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 supp...@barebones.com rather than posting to the group. Follow @bbedit on Twitter: http://www.twitter.com/bbedit
Color Scheme Creation
Is there a file somewhere out there that contains every kind of string, keyword, etc. that can be colored in BBEdit? I often want to tweak color schemes and find myself pasting in bits of code here and there to see how the scheme looks as a whole. Anyone have this built already? -- 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 bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com 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 supp...@barebones.com rather than posting to the group. Follow @bbedit on Twitter: http://www.twitter.com/bbedit