Select HTML Tag and all within it

When editing a HTML document I want to be able to mark/select a tag and all its content

e.g.
<tag1>
  <taIg2>
       <p>asa</p>
       <ul>
         <li>d</li>
       </ul>
  </tag2>
</tag1>

Now pretend my cursor is where the red line is what command/shortcut can I pressed so it selects <tag2>..content..</tag2>

I am using ideavim but if I find the command I can remap accordingly, at the moment Im selecting by line or collapsing then yanking which seems a bit of hack.

1 comment

Hi Matt,

The action is called 'Select Word at Caret'. It's mapped to Ctrl+W at default keymap. Subsequent invocations enlarge selection scope.

Denis

0

Please sign in to leave a comment.