Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio - how to quickly wrap text in HTML tags?

The new HTML editor in VS 2013 removed WYSIWYG mode and the Formatting toolbar is disabled. This is for the good, generally, but it also made simple edits like making some text bold or italics harder.

What I currently do to make some text bold is:

  1. Type <b>
  2. VS autocompletes </b>
  3. I select the end tag and press Ctrl+X
  4. I go to the end of the text that should be bold and press Ctrl+V

This is much less convenient than just pressing Ctrl+B or something similar. I know there is the "Surround with" command in Visual Studio, there are customizable keyboard shortcuts etc. so my hope is that the Ctrl+B functionality can somehow be achieved in Visual Studio. Is there some clever trick or am I possibly missing something other, rather simple?

like image 359
Borek Bernard Avatar asked Mar 04 '14 11:03

Borek Bernard


1 Answers

Web Essentials 2013 has a Surround with tag... feature (Alt+Shift+W) that is more fluid than the built-in Surround with. I'm probably just going to stick with it as I am using Web Essentials anyway.

like image 193
Borek Bernard Avatar answered Oct 05 '22 18:10

Borek Bernard