Click here to Skip to main content
15,884,388 members
Articles / Web Development / ASP.NET
Tip/Trick

Remove blank lines from code in Visual Studio

Rate me:
Please Sign up or sign in to vote.
4.77/5 (52 votes)
13 Oct 2010CPOL 117.3K   30   31
1. Click Ctrl+H (quick replace)
2. Tick "Use Regular Expressions"
3. In Find specify "^$\n"
4. In Replace box delete everything.
5. Click "Replace All"
All Blank lines will be deleted. :)
^ Means Beginning of line
$ Means End of line

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralReason for my vote of 5 Really very helpful Pin
Pokar16-Oct-10 8:12
Pokar16-Oct-10 8:12 
GeneralReason for my vote of 5 Amazing! Pin
Pokar Satyam14-Oct-10 8:06
Pokar Satyam14-Oct-10 8:06 
GeneralReason for my vote of 5 Great! Pin
Doshi Kavita14-Oct-10 1:14
Doshi Kavita14-Oct-10 1:14 
GeneralReason for my vote of 5 Really This was helpfull Pin
Uday Kumar B R13-Oct-10 19:29
Uday Kumar B R13-Oct-10 19:29 
GeneralReason for my vote of 4 Not working properly, but thanks for... Pin
Hiren solanki13-Oct-10 3:36
Hiren solanki13-Oct-10 3:36 
GeneralReason for my vote of 4 Good one... Pin
Talking Dotnet13-Oct-10 2:53
Talking Dotnet13-Oct-10 2:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.