Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove empty lines after Ctrl+K Ctrl+D

In VS 2012 and earlier i was able to press CTRL+K, CTRL+D which would change

<div>

   <div>

      <asp:TextBox runat="server" Id="Textbox1"></asp:/TextBox>

   </div>
</div>

to

<div>
   <div>
      <asp:TextBox runat="server" Id="Textbox1"></asp:/TextBox>
   </div>
</div>

So it would remove the extra lines. In VS 2013 when i do the same it doesn't format it correctly (or in the way i prefer).

I've looked under Tools but nothing that i can see that would sort the issue, i also have Productivity Power Tools installed and again no option to remove the extra lines.

Anyway around this?

Edit 1

using \n\n and \n Search

like image 576
Computer Avatar asked Nov 10 '22 17:11

Computer


1 Answers

Under Windows, line endings are \r\n. To search for blank lines, search for ^\r\n with regular expressions on and replace with a blank string.

enter image description here

Note: the Replace... shown is an empty string placeholder.

like image 116
Adrian Avatar answered Nov 15 '22 06:11

Adrian