Page 1 of 1

How Do you delete a blank line

Posted: Thu May 17, 2007 1:46 pm
by DRC2
How Do you delete a blank line when editing with textpad?

Posted: Thu May 17, 2007 2:18 pm
by dixonc
Using the delete key??? Same as every other program? Do you mean as part of a search and replace, i.e. find and remove all blank lines within a file?
Need a bit more info to help :D

Posted: Thu May 17, 2007 4:05 pm
by ACRobin
You can map "EditCutline" to a key press. I map "EditCutLine" to "CTL+Y" as this was the convention in the old MS "edit" text editor.

You will need to go to "configure" + "preferences" + "Keyboard" and you will find "EditCutLine" in "Edit".

Posted: Thu May 17, 2007 4:17 pm
by Bob Hansen
you may want to turn on View/Visible spaces when using the Delete key.

What may "appear" to be a blank line may not actually be blank.

With Visible Spaces enabled, you should see the end of line symbol in the first character position. If not, pressing Delete key is just removing the spaces, not the entire line.

delete blank line

Posted: Thu May 17, 2007 6:06 pm
by kitimat
this works for me:

search for: ^\n

replace with: nothing (leave blank)

this assumes the line is empty, that is no spaces tabs etc.

Thanks to Bob Hansen

Posted: Sun Jun 10, 2007 11:50 pm
by Harivney
Bob,
thanks very much for this post on using "view visible" to see if spaces are really spaces. It saved me a lot of time as I thought I was looking at a file with spaces and it turned out to be some other binary characters.