Jump to content

one idea is to just remove all formatting together then just re-add the important enters

i7-4790k | MSI Z97 GAMING-5 | Corsair Vengeance 16 GB | Samsung EVO-850 250GB SSD & WD blue 1 TB HDD | EVGA 1070 SC | Red NZXT H440 | Cooler Master G650W

 

Link to post
Share on other sites

Just now, KSores said:

how can i do that

in the text document hit command shift T to remove all the formatting. Might have to have it all selected, idk. Try without selecting the text first

i7-4790k | MSI Z97 GAMING-5 | Corsair Vengeance 16 GB | Samsung EVO-850 250GB SSD & WD blue 1 TB HDD | EVGA 1070 SC | Red NZXT H440 | Cooler Master G650W

 

Link to post
Share on other sites

Some text editors allow you to do search and replace and use some keywords or character combinations for invisible characters.

 

For example, in Ultraedit you can search for ^p (which means paragraph, or "any enter combination" ) and replace it with a space character or replace it with nothing, which basically means the enters are removed.

 

You could first try to replace two enter characters in a row with something else, then replace single enter characters with nothing, then revert the original stuff with enter to recover your paragraphs.

 

For example let's say you have this text


 

John has lemons and some apples and loves
going to market every day.

I love trees.

 

So replace double enters with some special character combination that you're sure won't be in your text ... so SEARCH FOR ^p^p  (two enters)  REPLACE WITH ^p%ENTER% (because i know %ENTER% never shows in the document) and this would be the result :

 

John has lemons and some apples and loves
going to market every day.
%ENTER%I love trees.

Now you can search for simple enter keys and replace them with nothing , SEARCH FOR ^p REPLACE WITH SPACE character :

 

John has lemons and some apples and loves going to market every day. %ENTER%I love trees.

 

Now you can search for the original character combination %ENTER% and replace it with ENTER . Optionally you can search for space character + %ENTER

SEARCH FOR %ENTER%  REPLACE WITH ^p :

 

John has lemons and some apples and loves going to market every day. 
I love trees.

 

So long story short, you reach the end result by going through an intermediate phase.

 

Optionally, now you can search for double spaces and replace them with single spaces, or search for space + ^p and replace them with ^p, so you won't have spaces at end of each text lines (the text editor may also have a function in menus somewhere called trim ending spaces that does same thing)

 

 

 

Link to post
Share on other sites

Is it a rich text file (like a word document) or a .txt file? Also, do you use Windows?

If you are on Windows and it's a .txt file, then you should probably use NotePad++ as your text editor.

 

In NotePad++ do this:
 

Quote

 

1: Click on this icon in the toolbar

1.PNG.30c7f8bd246ce2829f4ef70400ece4b1.PNG

Your document should now look something like this

2.PNG.de55427467c3495bea6b7cbb347fac6c.PNG

 

 

Quote

 

2: Go to Search -> Replace...

(There is also a hotkey ctrl+H that you can use)

 

 

Quote

 

3: What you want to search for is either \r or \n or both. In my case it was just \r. You want to replace all of them with a space character.

Make sure search mode is set to "Extended".

3.PNG.a470b2658815fecece5ddeeceef030a1.PNG

 

Quote

4: Click on replace all and then enjoy your text document which has no new lines in it.

You can now also turn off the  ¶ you enabled in step 1.

4.PNG.be2c44f771d2496f3348b1fed7a6daf0.PNG

 

 

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×