Home Download Buy Blog Forum Support

Select Balanced Tag Inward/Outward?

Select Balanced Tag Inward/Outward?

Postby dizmarkie on Fri Nov 25, 2011 2:48 pm

I can't seem to find a plugin or the ability to select "matching' paired tags.
For example.
If I had
<div class="wrapper">
<h1>title</h1>
<p>Lorem</p>
</div>

and i put my cursor somewhere on the div wrapper line, I'd like to be able to select its closing tag and EVERYTHING in between. This makes for finding closing and indenting blocks of code very easy.

anyone?
dizmarkie
 
Posts: 4
Joined: Fri Nov 25, 2011 2:42 pm

Re: Select Balanced Tag Inward/Outward?

Postby C0D312 on Fri Nov 25, 2011 3:04 pm

Selection > Expand Selection > Expand Selection to Tag. The command is already built into ST2. You may need to press it twice to select the tags as well.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Select Balanced Tag Inward/Outward?

Postby dizmarkie on Fri Nov 25, 2011 3:08 pm

Thank you very much.
I did see this but I got hung up on selecting it twice. When I hit the shortcut for it, it would select everything inside of my selected tags but not the tags in which I placed my cursor.

Once I hit it again, it them wrapper my selection to include the tags my cursor was on. Exactly what I wanted :)
thanks again!
dizmarkie
 
Posts: 4
Joined: Fri Nov 25, 2011 2:42 pm


Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 18 guests

cron