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

后端 未结 8 1971
栀梦
栀梦 2020-12-12 15:10

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 Cod

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-12 16:01

    I know this is an ancient thread but having come up against the issue I finally got round to making my own and as this is one of the first results in Google I figured people might find this useful.

    Actually it was pretty easy, I just copied from an existing HTML snippet and moved around the literals. The following snippet will surround with a generic HTML tag, it prompts for the tag and will put it in both the opening and closing tags.

    
      
      
    Html Liam Slater h Markup snippet for HTML SurroundsWith
    tag tag selected content content $selected$$end$]]>

提交回复
热议问题