Is there a shortcut in Visual Studio (2008) that will allow me to jump to matching HTML tag... as CTRL+] does for matching braces when you are in code view?
Example:
<table> <tr> <td> </td> </tr> </table|>
Cursor is on closing table tag and I would like to press something like CTRL+] to jump to opening table tag.
Any ideas?
Ok here is the answer as macro which i've built which does it (toggle ) including go to focus :
Here is the demo :
And here is the code , enjoy !
This totally works when you open a HTML file with the XML Editor (Right click -> Open With... -> XML Editor).
In Visual Studio 2015, this is now supported with the usual bracket matching keystrokes;
ctrl+]
jumps from the start tag to the end tag.ctrl+shift+]
selects everything between the start tag and the end tag.It seems pretty sensitive, though, and to select an entire tag and its contents you need to start right on the
<
that opens the tag.In Visual Studio 2012, in 'source' view, right at the bottom of the document window, there is a breadcrumb-trail-style description of the DOM. You can click at any point to select.
It's not a keyboard shortcut, but it does give you the selection behaviour you're looking for, and you don't need to match tags by eye any more.
(Edit) If you hover over the breadcrumb, you will see a dropdown arrow. Click the down arrow and click "Select Tag Content". Then you can just scroll up or down until you find text that is not highlighted.
After http://www.jetbrains.com/resharper/ is installed CTRL+] for matching braces works in HTML edit mode...
No, you can't do that in Visual Studio 2010, not in the current version or in older ones. Maybe the next version will have this feature.