Re: Edit both start and closing HTML tags at once?

2011-08-24 Thread Robert A. Rosenberg
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: How to get Balance Tags to include the tags

2011-08-24 Thread Roland Küffner
Hi, 
Am 24.08.2011 um 24, 01:25 schrieb DaveHein:

 The problem I'm running into is that Balance Tags will select the
 innner HTML but not the span tags themselves. So if I put the cursor
 somewhere on or in spansome normal text here/span and did a Cmd-
 B, the some normal text here would be selected, but the opening
 span and closing /span would not be selected.
 
 I cannot see any way to get the tags that delimit the selected text to
 be selected as well.

The following script does exactly what you want. I think this script was a 
result of a similar discussion on this list years ago. I didn't write it myself 
but unfortunately I do not know who's to be credited for it:


tell application BBEdit
if (balance tags) then
set x to characterOffset of selection
set y to x + (length of selection)
inside tag start range (x - 2) end range (x - 2)
set tagLength to (end_offset of tag of result) - (start_offset 
of tag of result)
set x to x - tagLength - 1
inside tag start range (y + 1) end range (y + 1)
set tagLength to (end_offset of tag of result) - (start_offset 
of tag of result)
set y to y + tagLength
select characters x thru y of window 1
else
beep -- script beeps if it could not create an initial balance
end if
end tell


happy balancing,
Roland

-- 
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: How to get Balance Tags to include the tags

2011-08-24 Thread Matthew Schinckel
Whoops: bit of a bug in that last one. If you weren't in a tag, or weren't 
in a span tag, it moves the insertion point.

Also note that it will not re-select text if you had a selection.

This one fixes the first bug, but not the second.

*tell* *application* BBEdit

*tell* *front* *window*

*set* cursorPos *to* characterOffset *of* selection

*balance tags*

*set* startPos *to* characterOffset *of* selection

*set* endPos *to* startPos + (length *of* selection)

*select* (*characters* (startPos - 6) *thru* (endPos + 6))

*set* selectedText *to* selection *as* *text*

*if* *characters* 1 *thru* 6 *of* selectedText *as* *text* *is* *equal 
to*span 
*then*

*set* replaceText *to* *characters* startPos *thru* (endPos - 1) *as* *text*

*set* selection *to* replaceText

*select* *insertion point* *before* *character* (cursorPos - 6)

*else*

*select* *insertion point* *before* *character* (cursorPos)

*end* *if*

*end* *tell*

*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


3077 breaks 'save workspace'?

2011-08-24 Thread blinde
with build 3077 i am no longer able to save workspaces.

is anyone else experiencing this?

are there basic things to try?

thanks!

bruce



-- 
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?

2011-08-24 Thread Tudor
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


Aw: Re: php syntax coloring inside of html tag

2011-08-24 Thread Sebastian Becker
Hi, is there any good solution for this?

I think it's not so rare that php/html - code is mixed up in one document. I 
just switched from Coda because BBEdit does many things better than Coda - 
but i didn't even think about that highlighting issue.

There is a document type / syntax mode for Ruby in HTML but what I really 
would appreciate is PHP in HTML or even better Wordpress in HTML : )

best regards


-- 
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: 3077 breaks 'save workspace'?

2011-08-24 Thread Rich Siegel
On Wednesday, August 24, 2011, blinde bruce.li...@gmail.com wrote:

 with build 3077 i am no longer able to save workspaces.
 
 is anyone else experiencing this?
 
 are there basic things to try?

On Monday, August 22, 2011, Rich Siegel sie...@barebones.com wrote:

 One final note: If you run into a bug in a pre-release version, PLEASE
 DO NOT REPORT THE BUG TO THE LIST. This includes asking about whether
 others have seen the same problem. Instead, please send a bug report
 to supp...@barebones.com and we will deal with it there. This will
 help us keep the list discussion on topic and productive for all list
 members.

Thanks,

R.
-- 
Rich Siegel Bare Bones Software, Inc.
sie...@barebones.com  http://www.barebones.com/

Someday I'll look back on all this and laugh... until they sedate me.

-- 
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


BBEdit 10.0.1 : not automatically detecting language ?

2011-08-24 Thread Andrew Davidson
After opening a .html or .css file in BBEdit 10, I find that it is not 
automatically setting the source code language from the file extension (or 
the contents).

I see from Preferences | Languages that they are installed. If I set it 
manually in Edit | Text Options..., it does the proper syntax coloring. And 
if I save the file, upon reopening the language is still set.

Am I missing something to get it to automatically detect the source 
language?

-- 
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: 3077 breaks 'save workspace'?

2011-08-24 Thread blinde
rich -

sorry... i did report it, but figured you guys were swamped when i
didn't hear back.

i forgot about your previous request, and was thinking that maybe the
list could come through with simple things i should be trying/
checking instead of whomping on y'all.

my bad. sorry.

bruce







On Aug 24, 10:13 am, Rich Siegel sie...@barebones.com wrote:
 On Wednesday, August 24, 2011, blinde bruce.li...@gmail.com wrote:
  with build 3077 i am no longer able to save workspaces.

  is anyone else experiencing this?

  are there basic things to try?
 On Monday, August 22, 2011, Rich Siegel sie...@barebones.com wrote:
  One final note: If you run into a bug in a pre-release version, PLEASE
  DO NOT REPORT THE BUG TO THE LIST. This includes asking about whether
  others have seen the same problem. Instead, please send a bug report
  to supp...@barebones.com and we will deal with it there. This will
  help us keep the list discussion on topic and productive for all list
  members.

 Thanks,

 R.
 --
 Rich Siegel                                 Bare Bones Software, Inc.
 sie...@barebones.com                      http://www.barebones.com/

 Someday I'll look back on all this and laugh... until they sedate me.

-- 
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: Aw: Re: php syntax coloring inside of html tag

2011-08-24 Thread Watts Martin

Sebastian Becker wrote:


I think it's not so rare that php/html - code is mixed up in one
document. I just switched from Coda because BBEdit does many things
better than Coda - but i didn't even think about that highlighting issue.



There is a document type / syntax mode for Ruby in HTML but what I
really would appreciate is PHP in HTML or even better Wordpress in
HTML : )


If you set the document type to HTML, then you get PHP (and CSS and 
Javascript) syntax highlighting along for the ride automatically, and 
the clipping set will also automatically change based on language as 
you move through the document.


The case that BBEdit can't highlight correctly that Coda can in this 
regard is in tag attributes:


pa href=?php echo $url ?Click Here!/a/p

Coda would correctly switch to the PHP scope in the HREF, while BBEdit 
remains in HTML scope.


(Then again, with BBEdit I can use the Close Tag command to close the 
/a and /p in that scenario, whereas Coda will be confused by the ? 
at that point, so everything's a bit of a tradeoff.)


--
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


Contextual Menus

2011-08-24 Thread Thermus
On page 22 of the BBEdit 10 manual ( 
http://pine.barebones.com/manual/BBEdit_10_User_Manual.pdf
) it says:

Contextual Menus
When you Control-click on selected text or at the insertion point in a
text window, BBEdit’s contextual menu will display a set of commands
relevant to that location or text, as well as some appropriate
standard commands (such as Cut/Copy/Paste, or Check Spelling) so you
do not have to hunt around in the menu bar for them.

You can choose which commands to include on the contextual menu in the
Menus  Shortcuts preference panel.


I don't see an option to choose which commands are included in the
context menus.  What I'd really like is to be able to run an
AppleScipt via a context menu based on the language/file extension and
what is selected.  Is this possible?

Thanks in advance for any guidance!

-- 
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?

2011-08-24 Thread Robert A. Rosenberg
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