|
-
Jun 27th, 2009, 11:26 AM
#1
Thread Starter
Frenzied Member
Removing extra whitespace
Does anyone know if there is a command to remove extra whitespace(blank lines) when coding?
-
Jun 27th, 2009, 11:46 AM
#2
Re: Removing extra whitespace
You mean in your source code presumably?
If so - not that i'm aware of
-
Jun 27th, 2009, 12:16 PM
#3
Re: Removing extra whitespace
No command that I know of as well, but I do know of the DELETE and BACKSPACE keys.
From my burrow, 2 feet under.
-
Jun 27th, 2009, 12:42 PM
#4
Thread Starter
Frenzied Member
Re: Removing extra whitespace
Yeah I know that one too , hoping there was an easier way, especially when there are a ot of blank lines
-
Jun 27th, 2009, 12:48 PM
#5
Re: Removing extra whitespace
Well ultimately your source code is just text files so there's nothing much to stop you writing a tool which runs through the text files and strips empty lines.
-
Jun 27th, 2009, 01:17 PM
#6
Thread Starter
Frenzied Member
Re: Removing extra whitespace
-
Jun 27th, 2009, 01:20 PM
#7
Re: Removing extra whitespace
I think keystone meant you can just copy your code to a txt, run some script through it to delete the empty spaces, then copy it back into your program. Maybe you understood that but there's not much to "look into" and it would be a lot harder if you tried to do it some other way.
-
Jun 27th, 2009, 01:24 PM
#8
Re: Removing extra whitespace
Why not edit the vb files directly? They're just text files, no need to copy the text to a separate txt file at all.
Just run through those vb files line by line, see if line.Trim <> String.Empty, and if so, append that line to a string. At the end of the loop, you save that string as the new vb file, done.
-
Jun 27th, 2009, 01:26 PM
#9
Re: Removing extra whitespace
 Originally Posted by NickThissen
Why not edit the vb files directly? They're just text files, no need to copy the text to a separate txt file at all.
Just run through those vb files line by line, see if line.Trim <> String.Empty, and if so, append that line to a string. At the end of the loop, you save that string as the new vb file, done.
Yup - thats what I meant - no need to go via intermediate text files, although as a note of caution its worth working on backup copies of your files until you've thoroughly tested your code!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|