How to insert blank line in between every line
-
@Sean-Shaffer
Option Find and Replace
Find: $
Replace: \n
This will add an empty line to each line. -
Hmmmmmm. Well, that might be bad if the OP is using anything other than Unix/Linux line endings. Plus, I wouldn’t think that the user would want to turn blank lines into a bigger section of blank lines.
I’d try:
Find:
^.+(\R)
Replace:$0\1
Search mode: Regular expression -
To be better, go with:
Find:
(?-s)^.+(\R)(…since we don’t know the user’s setting of the
. matches newlinecheckbox. The above change makes that checkbox’s setting irrelevant.) -
Alternatively, a well-placed
?in the original would have made it okay, even without the(?-s)and without caring about the checkbox setting:Find:
^.+?(\R)And no, Peter, repeated postings by me here is not a veiled attempt for more upvotes. :)
-
hmm - what about
find:\R
replace:$0$0
?
;-) -
For me, that puts too much “blankness” in certain spots (say, between “paragraphs”). But since we have no idea really what the OP wants for this circumstance…
-
I’m editing a list of trackers for torrenting. For better readability, I want each line to be spaced apart. For example,
http://redacted1/announce http://redacted2/announce http://redacted3/announcewould become:
http://redacted1/announce http://redacted2/announce http://redacted3/announce
moderator redacted urls and added code block; we don’t want this topic to become a honeypot for torrent-advertising spam
-
Alan Kilborn provided the correct Find/Replace solution. Thank you!
-
@Alan-Kilborn That worked for me, Thanks.
Had same problem with separating a list of trackers as OP. -
@Sean-Shaffer It’s not just for readability. It simply doesn’t work other way. I mean when you copy-paste a list of trackers - it has to be line separated like that, otherwise it just doesn’t work (talking uTorrent here).
So when i update the list in Notepad++ i hit “remove duplicates” and that also removes empty lines between addresses. So then i need to put them back, which this post helped me do. Nice, thanks everybody. -
@Alan-Kilborn said in How to insert blank line in between every line:
Find: (?-s)^.+(\R)
typing this in Find does nothing and some small windows opens :) trying to use Replace messes up whole document, leaving only 2 lines there.
1st suggestion work fine, but that second idk, i wasn’t able to make it work. -
Re: How to insert blank line in between every line
Using column selection (alt - left mouse btn)

press enter

Maybe the fastest way :)) -
This worked for me on tracker list
Find: \n
replace: \n\n
search mode: extendedif you replace with \n\n\n it adds 2 lines inbetween
before:
after:
hope this helps
moderator deleted before/after data; don’t want this to become a honeypot for tracker url spamming
-
@Chris-Stott said in How to insert blank line in between every line:
Find: \n
replace: \n\n
search mode: extendedThis is rather dangerous.
Nice way to corrupt your files, possibly unknowingly, if your files are Windows and not Linux.A better way might be:
Find:(\R)
Replace:$1$1
Search mode: Regular expression
I suppose this is about the same as @Ekopalypse 's post earlier, Jul 17, 2019, 11:01 AM. -
@Alan-Kilborn said in How to insert blank line in between every line:
I suppose this is about the same as @Ekopalypse 's post earlie
No … I have zero dollars, you have two? No cookies for me :(
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login