Re: Edit both start and closing HTML tags at once?
At 09:42 -0700 on 08/23/2011, Watts Martin wrote about Re: Edit both start and closing HTML tags at once?: I do suspect one could replicate this functionality in an AppleScript, though -- find the tag containing the insertion point, perhaps by searching backward for the and then forward for the , then replacing both it and the matching closing tag with whatever the user inputs in a dialog box. (This could be fascinatingly catastrophic if you used it on an HTML tag that didn't have a matching close tag, of course, unless it had a list of self-closing tags to keep it from doing that.) Even worse is with HTML (as opposed to XHTML) where the closing tag is optional (ie: /P tags are optional so unless you always use them, they are not always there to find since the next P implicitly closed the prior one). -- 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: Edit both start and closing HTML tags at once?
On 24 aug., 07:29, Robert A. Rosenberg rar...@banet.net wrote: Even worse is with HTML (as opposed to XHTML) where the closing tag is optional (ie: /P tags are optional so unless you always use them, they are not always there to find since the next P implicitly closed the prior one). Maybe. But somehow this works pretty good in Dreamweaver, so it definitely can be done. -- 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: Edit both start and closing HTML tags at once?
At 09:37 -0700 on 08/24/2011, Tudor wrote about Re: Edit both start and closing HTML tags at once?: On 24 aug., 07:29, Robert A. Rosenberg rar...@banet.net wrote: Even worse is with HTML (as opposed to XHTML) where the closing tag is optional (ie: /P tags are optional so unless you always use them, they are not always there to find since the next P implicitly closed the prior one). Maybe. But somehow this works pretty good in Dreamweaver, so it definitely can be done. Not necessarily. You have to remember that Dreamweaver is code so it can treat finding a p before it finds a /p as if the /p was there. We are talking about script where it is looking for the /p tag and not finding it. Even if you could look for the first /p OR p tag you would need different processing logic depending on which you found (ie: For the p case act as if it were proceeded by a /p). This is easy to do with code but harder/impossible to do with other methods. -- 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: Edit both start and closing HTML tags at once?
On 23 aug., 03:49, Kerri Hicks kerri.hi...@gmail.com wrote: I would do it by...(all keystrokes are mine, and are probably not defaults) Highlighting the line (cmd-L) Remove Markup (under Markup Utilities) (cmd-shift-X) Use the Clipping for div_class (cmd-shift-D) --Kerri Yes, I tried this, but it's still far from optimal. I still think the Edit Markup command would be the perfect tool for editing tags the way I described earlier, and if someone from BBEdit reads this thread, please consider this as a feature request. It would be a killer feature which AFAIK has no equivalent in another Mac text editor, excepting Dreamweaver (which has a feature called Quick Tag Editor allowing full editing of tags). Thanks, Tudor -- 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: Edit both start and closing HTML tags at once?
On Aug 22, 2011, at 14:03, Tudor wrote: Search and replace is OK if I want to modify many tags at once, but for editing a single tag is overkill. __ That depends. :) -- Best Regards, Chris tell application BBEdit try tell selection of front text window replace \\w[^]* using div class=\foo\ options {search mode:grep, case sensitive:false} replace /\\w[^]* using /div options {search mode:grep, case sensitive:false} end tell on error errMsg number errNum set sep to == set e to sep return Error: errMsg return sep return ¬ Error Number: errNum return sep beep display dialog e end try end tell -- 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: Edit both start and closing HTML tags at once?
Tudor wrote: I still think the Edit Markup command would be the perfect tool for editing tags the way I described earlier, and if someone from BBEdit reads this thread, please consider this as a feature request. You should strongly considering submitting this as, you know, a feature request. :) I'm not sure how often this need actually comes up, which might make it somewhat low priority, but who knows. I do suspect one could replicate this functionality in an AppleScript, though -- find the tag containing the insertion point, perhaps by searching backward for the and then forward for the , then replacing both it and the matching closing tag with whatever the user inputs in a dialog box. (This could be fascinatingly catastrophic if you used it on an HTML tag that didn't have a matching close tag, of course, unless it had a list of self-closing tags to keep it from doing that.) -- Watts Martin lay...@gmail.com -- 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: Edit both start and closing HTML tags at once?
Bucky Junior wrote: And nested tags would be a challenge too. Actually, you can call Balance Tags from AppleScript, can't you? Maybe that would be the start of working this. Hmm. -- Watts Martin lay...@gmail.com -- 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: Edit both start and closing HTML tags at once?
Search and replace is OK if I want to modify many tags at once, but for editing a single tag is overkill. Thanks, Tudor On 22 aug., 20:29, go...@fred.net wrote: This would be done with GREP search and replace within BBE. BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; } On Mon 11/08/22 13:04 , Tudor wrote: Hi, I am new to BBedit, testing the demo version currently. I was wondering if it's possible to edit both start and closing HTML tags at once, for example transforming something like Lorem ipsum into Lorem ipsum. Any ideas? This would be a useful addition to the Edit Markup command, which (as far as I can tell) only allows changing tag attributes, but cannot rename the tag itself. Thanks, Tudor -- 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 To unsubscribe from this group, send email to bbedit+ For more options, visit this group at ; If you have a feature request or would like to report a problem, please email rather than posting to the group. Follow @bbedit on Twitter: ; -- 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: Edit both start and closing HTML tags at once?
On Aug 22, 1:04 pm, Tudor tmvede...@gmail.com wrote: Hi, I am new to BBedit, testing the demo version currently. I was wondering if it's possible to edit both start and closing HTML tags at once, for example transforming something like p class=fooLorem ipsum/p into div class=fooLorem ipsum/div. Any ideas? I would do it by...(all keystrokes are mine, and are probably not defaults) Highlighting the line (cmd-L) Remove Markup (under Markup Utilities) (cmd-shift-X) Use the Clipping for div_class (cmd-shift-D) --Kerri -- 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