visual studio - Matching tag in HTML keyboard shortcut -
is there shortcut in visual studio (2008) allow me jump matching html tag... ctrl+] matching braces when in code view?
example:
<table> <tr> <td> </td> </tr> </table|>
cursor on closing table tag , press ctrl+] jump opening table tag.
any ideas?
ok here answer macro i've built (toggle ) including go focus :
here demo :
and here code , enjoy !
imports system imports envdte imports envdte80 imports envdte90 imports envdte90a imports envdte100 imports system.diagnostics imports system.windows.forms public module module2 sub begintoend() 'place cursor somewhere in beginning tag, run macro, select beginning end tag dte.activedocument.selection.selectline() dim objsel textselection = dte.activedocument.selection dim toppoint textpoint = objsel.toppoint dim ltopline long = toppoint.line objsel.gotoline(ltopline, false) ' dte.activedocument.selection.startofline() dte.activedocument.selection.selectline() dim line1 string = dte.activedocument.selection.text() if instr(line1, "</") ' msgbox(line1) dte.executecommand("edit.toggleoutliningexpansion") dte.activedocument.selection.endofline() dte.activedocument.selection.startofline(vsstartoflineoptions.vsstartoflineoptionsfirsttext, true) objsel.gotoline(ltopline, false) dte.executecommand("edit.toggleoutliningexpansion") dte.executecommand("edit.toggleoutliningexpansion") else dte.executecommand("edit.toggleoutliningexpansion") dte.activedocument.selection.endofline(false) dte.executecommand("edit.toggleoutliningexpansion") end if dte.activedocument.selection.selectline() dim line2 string = dte.activedocument.selection.text() dim objsel3 textselection = dte.activedocument.selection dim toppoint3 textpoint = objsel3.toppoint dim ltopline3 long = toppoint3.line objsel.gotoline(ltopline3, false) dte.activedocument.selection.startofline(vsstartoflineoptions.vsstartoflineoptionsfirsttext, false) end sub end module
Comments
Post a Comment