[TxMt] [ html ] selecting text between tags

Eric O'Brien ericob at possibilityengine.com
Sun Feb 5 03:12:16 UTC 2006


Actually, I think this is a very GOOD question.  It is something I  
often want to do when I'm trying to figure out somebody else's HTML  
code.

There is the Edit > Select > Enclosing Brackets command, but the  
command I want might be called "Select enclosing TAG."

For example, if you set the insertion point in a line of text that is  
enclosed by paragraph tags, and execute this command, all the text  
from "<p>" to "</p>" would be selected.  Conceptually, you work  
backwards from the insertion point until you find a tag, then work  
forward from there until you find the matching closing tag, then  
select the entire range.

If the starting point was a selection, the same thing happens except  
that the starting point for "search backwards for a tag" would be the  
beginning of the selection, and the "...then work forward from there"  
point would be the end of the current selection.

With this functionality, you could set the insertion point inside a  
big mess of HTML code and, by repeatedly issuing the command, work  
your way outward.

eo


On Feb 2, 2006, at 5:27 PM, minimal.design wrote:

> This, I am sure, is super newbie basic material, but somehow it  
> eludes me with tenacity...
>
> What's the shortcut to select text within tags in html?  Let's say,  
> for instance, to select "I am a paragraph" in:
>
> <p>I am a paragraph</p>
>
> I'm ashamed to ask that, so go easy on me, thanks ;)



More information about the textmate mailing list