Sublime Forum

Target and remove an enclosing tag

#1

Consider the following html:

<div class="number_1">
  <div class="number_2">
    <div class="number_3">
      <div class="number_4">[cursor is here]</div>
    </div>
  </div>
</div>

How would I quickly remove div.number_2 and its enclosing tag from my cursor position? I couldn’t find any “remove enclosing tags” feature in ST and so far the best I can do is:

  1. ⌘⇧A,
  2. ⌘⇧A,
  3. ⌘⇧A,
  4. ⌘⇧A,
  5. ⌘X,
  6. ⌘⇧A,
  7. ⌘⇧A,
  8. Delete,
  9. ⌘V

This seems dumb; I’m hoping there’s a better way.

0 Likes