Matching tag in HTML keyboard shortcut

2019-01-23 01:13发布

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?

7条回答
Lonely孤独者°
2楼-- · 2019-01-23 01:56

I search and couldn't found direct short cut. But you can use..

If you want to go starting matching HTML tag, then follow below steps.

  1. Place cursor at ending matching HTML tag.
  2. Press Ctrl+M+M [To Collapse entire tag]
  3. Press Home Key [To place cursor at before starting tag]
  4. Press Ctrl+M+M [To Expand entire tag]

If you want to go ending matching HTML tag, then follow below steps.

  1. Place cursor at starting matching HTML tag.
  2. Press Ctrl+M+M [To Collapse entire tag]
  3. Press End Key [To place cursor next to ending tag]
  4. Press Ctrl+M+M [To Expand entire tag]
查看更多
登录 后发表回答