How do I wrap a selection with an HTML tag in Visual Studio?

Posted by dansays on Stack Overflow See other posts from Stack Overflow or by dansays
Published on 2008-10-10T14:08:13Z Indexed on 2010/03/12 1:07 UTC
Read the original article Hit count: 329

Filed under:

This seems like the most basic question in the world, but damned if I can find an answer.

Is there a keyboard shortcut, either native to Visual Studio or through Code Rush or other third-party plug-in, to wrap the current selection with an HTML tag? I'm tired of typing the opening tag, cutting the misplaced closing tag to the clipboard, moving the cursor, and pasting it at the end where it belongs.

Update: This is how TextMate handles surrounding a selection with a tag. Frankly, I'm stunned that Visual Studio doesn't seem to have a similar feature. Creating a macro or snippet for every conceivable tag I might want to use seems absurd.

© Stack Overflow or respective owner

Related posts about visual-studio