Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a 'select between tags' shortcut in Visual Studio Code?

In Notepad++ I used this extension that when I was inside the arrows of any tag in html, I could use a keyboard shortcut to select either only the contents of the tag, or also include the tag into the selection.

Ie.

<div>   div content </div> 

When I'm in tag I would like to select div content without using mouse to do the selection.

I've seen some suggestions of using the shift+alt+right arrow shortcut, but it really isn't the same thing.

like image 787
yodalr Avatar asked Sep 08 '17 16:09

yodalr


Video Answer


1 Answers

The built-in command Emmet: Balance (outward) does what you want. It selects content of a tag and then progressively includes the tag and works outward just like Expand Selection to Tag in Sublime, and sounds like the extension for Notepad++.

You can create a custom keybinding for it as well in the preferences, for example

[     {         "key": "ctrl+shift+a",         "command": "editor.emmet.action.balanceOut"     } ] 
like image 129
jodyfanning Avatar answered Sep 20 '22 08:09

jodyfanning