Sublime Forum

Select Parent Tag

#1

Hey guys,

I have ST2 installed and I was wondering is there option to select parent tag like in the Dreamweaver? This is how it works:

<div>
  <p>
    <span>Something</span>
  </p>
</div>

If my cursor is on the text “Something” and I click option to select parent tag in Dreamweaver whole span tag will be selected. If I click again whole paragpraph will be selected. This goes all the way to the body tag.

Is there something like this in ST2?

Thanks

0 Likes

#2

The ZenCoding plugin does this as one of its actions. See here: code.google.com/p/zen-coding/wik … rd/Outward

The default bindings for these two commands in Nick’s (Sublimator’s) plugin are Ctrl-Shift-T (select inward) and Ctrl-Shift-N (select outward).

0 Likes

#3

I was searching for something like this in ST3…

For sublimetext 3 there is a plugin called “XPath”.

https://packagecontrol.io/packages/xpath

This allows go to parent element:

1 Like