Click here to Skip to main content
11,412,833 members (73,038 online)
Click here to Skip to main content

Remove blank lines from code in Visual Studio

, 13 Oct 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
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. Smile | :)
^ 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)

Share

About the Author

Dave Paras
Software Developer
India India
No Biography provided

Comments and Discussions

 
QuestionApplicable To Pin
maitrey684 at 2-Jul-13 0:03
membermaitrey6842-Jul-13 0:03 
QuestionThnx Pin
Remya Viswan at 26-Feb-13 18:56
memberRemya Viswan26-Feb-13 18:56 
GeneralMy vote of 5 Pin
Renju Vinod at 12-Dec-12 20:39
memberRenju Vinod12-Dec-12 20:39 
SuggestionIncluding spaces Pin
Mika at 3-Oct-12 0:20
memberMika3-Oct-12 0:20 
GeneralMy vote of 5 Pin
Koshy Panicker John at 16-Sep-12 21:11
memberKoshy Panicker John16-Sep-12 21:11 
GeneralReason for my vote of 5 i wish i read this an hour ago. i ha... Pin
A. Duman at 27-Oct-11 22:47
memberA. Duman27-Oct-11 22:47 
GeneralWorking. My vote of 5 Pin
Syed Shabeer at 25-Oct-11 3:05
memberSyed Shabeer25-Oct-11 3:05 
GeneralReason for my vote of 5 Reason for my vote of 5 Good one Pin
RaviRanjankr at 21-Jul-11 10:27
mvpRaviRanjankr21-Jul-11 10:27 
GeneralReason for my vote of 5 Very helpful Dave!!! Came to know ab... Pin
Jyothikarthk at 15-Jul-11 0:26
memberJyothikarthk15-Jul-11 0:26 
GeneralIt is great,Thank you Pin
Eric Yin 2012 at 16-May-11 1:08
memberEric Yin 201216-May-11 1:08 
GeneralReason for my vote of 4 good .. thank you for the informatio... Pin
ahsan sarfraz at 24-Jan-11 1:15
memberahsan sarfraz24-Jan-11 1:15 
GeneralReason for my vote of 5 Short and effective solution Pin
sign zala at 5-Nov-10 14:57
membersign zala5-Nov-10 14:57 
GeneralReason for my vote of 1 Your posted solution does not work i... Pin
xzz0195 at 5-Nov-10 5:26
memberxzz01955-Nov-10 5:26 
GeneralReason for my vote of 4 It's good, helpful. Pin
NirdeshSaini at 27-Oct-10 5:07
memberNirdeshSaini27-Oct-10 5:07 
GeneralReason for my vote of 4 Small and Powerfull... Piyush_mca@ya... Pin
piyush21 at 25-Oct-10 19:01
memberpiyush2125-Oct-10 19:01 
GeneralReason for my vote of 1 What's new here ? Pin
rmiguel at 25-Oct-10 14:19
memberrmiguel25-Oct-10 14:19 
GeneralReason for my vote of 5 Works as promised Pin
GodOnlyKnows at 25-Oct-10 12:09
memberGodOnlyKnows25-Oct-10 12:09 
GeneralReason for my vote of 5 Worked great Pin
bjreed at 22-Oct-10 8:51
memberbjreed22-Oct-10 8:51 
GeneralReason for my vote of 5 Good Job Pin
barsham at 19-Oct-10 17:53
memberbarsham19-Oct-10 17:53 
GeneralReason for my vote of 1 Give Like this Tips Pin
karthikvadugan at 19-Oct-10 3:34
memberkarthikvadugan19-Oct-10 3:34 
GeneralReason for my vote of 5 A very useful regular expression tha... Pin
dannielley2k1 at 18-Oct-10 22:56
memberdannielley2k118-Oct-10 22:56 
GeneralReason for my vote of 5 To be clear: do not type the quotes ... Pin
Emile van Gerwen at 18-Oct-10 22:31
memberEmile van Gerwen18-Oct-10 22:31 
GeneralReason for my vote of 5 Basic but powerfull Pin
SohelElite at 18-Oct-10 21:44
memberSohelElite18-Oct-10 21:44 
GeneralReason for my vote of 1 Poor Pin
RomanoScuri at 18-Oct-10 21:41
memberRomanoScuri18-Oct-10 21:41 
GeneralReason for my vote of 5 Really Useful one Pin
thatraja at 16-Oct-10 22:32
mvpthatraja16-Oct-10 22:32 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150427.1 | Last Updated 13 Oct 2010
Article Copyright 2010 by Dave Paras
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid