Submitted by Vievin t3_10gwlin in LifeProTips

I learnt this from my DnD days, when most of my character sheet was copied and pasted from various PDFs into the site we used. The formatting was often horrible, especially when I copied out of sidebars or tables. So what I did was select the relevant text in the PDF, copy it, paste it into the URL bar, ctrl-A and copy from the URL bar, and paste it into the website. Boom, all line breaks gone.

A more practical application for this is when you're applying to jobs, and need to basically copy the contents of your resume onto their web forms.

1,105

Comments

You must log in or register to comment.

keepthetips t1_j5505nw wrote

Hello and welcome to r/LifeProTips!

Please help us decide if this post is a good fit for the subreddit by up or downvoting this comment.

If you think that this is great advice to improve your life, please upvote. If you think this doesn't help you in any way, please downvote. If you don't care, leave it for the others to decide.

1

bayouth t1_j5524dm wrote

cmnd-shift v does this in most applications

23

imkinagana t1_j556652 wrote

You can simply paste as plain text with ctrl + shift + v

28

Garrth_ t1_j557mk2 wrote

or use notepad like human

5

Dreunin t1_j5589iv wrote

I've always done this! People consider me insane but can name no better alternative. Ctrl + shift + v rarely gets rid of the line breaks.

If someone knows a shortcut, I'd love to know

134

turok2 t1_j55am56 wrote

I tend to use the start menu.

Windows key. ctrl-v. ctrl-a. ctrl-x.

10

DaBIGmeow888 t1_j55ilqy wrote

Dang I've been using online page break remover website but this is faster.

2

wowbackatitReddit t1_j55p8v3 wrote

You can also use Notepad on Windows. Helps because it's meant to hold more than one line

3

RoamingArchon t1_j55q6k5 wrote

Just wanted to add, anything you copy into the address bar of your browser will be searched on the Internet using the browser's default search engine, even without submitting it.

Don't put anything sensitive in the URL bar!

67

FreeXFall t1_j55q8j4 wrote

The key here is removing line breaks, not formatting. Nice trick.

7

talk_to_arpit_2 t1_j55vup6 wrote

lol.. and I thought, it was only me who was doing it; I basically do it to get rid of all fancy formatting and want plain text, to copy

1

heidismiles t1_j55wyzd wrote

If you use a developer app like Sublime Text, you can paste the whole paragraph and then hit the shortcut to join all the lines.

1

freihoch159 t1_j55yabs wrote

Also cleans layout coming from word or other things, my alternative for using the editor if i have some weird formatted text

1

PaxNova t1_j55ykc7 wrote

In Word, you can also highlight the text you want to remove line breaks from and do find/replace.

One the find line, search for ^p. On the replace line, put nothing. ^p means "new paragraph" in Word. You can also replace it with a space if you want.

3

YabbaDabbaUngaBunga t1_j562ufz wrote

If you're doing this sort of thing frequently, learn regular expressions. Yes, the barrier to entry can be a little high for an otherwise principally non-technical person, however if text manipulation is a frequent task of yours, you'll thank yourself for having learned.

Many editors (Notepad++, etc.) support regular expressions for search-and-replace. In this case you'd simply search for \s+ (any whitespace characters) and replace them with a single space. This will convert all sequences of newlines, tabs, and spaces, to a single space.

ETA: One caveat with OP's LPT is character length limits on input fields; Chrome appears to be ~2MB, which is really, really high for most practical uses of this trick. But, if you were to copy/paste a whole PDF textbook, you could run into problems. See: https://chromium.googlesource.com/chromium/src/+/master/docs/security/url_display_guidelines/url_display_guidelines.md#URL-Length

20

DigitalSteven1 t1_j564f9s wrote

Just a minor correction, the almost universal escape character is a backslash. i.e. it's "\n" rather than "/n."

Windows does some funny stuff in cmd and powershell, being caret (^) and backtick (`). Afaik "/" isn't used anywhere, though.

2

breakbeat123 t1_j567fxa wrote

On word paste the text from your PDF.

Ctrl + H to replace.

Then find '^p' and replace with a space ' '.

This will turn everything into one paragraph, so if copying multiple paragraphs you'll have to check where to put the line break back in.

1

Skalion t1_j5686jk wrote

Posting it on editor will get rid of all the styling

1

Che_Pibe t1_j56ojhl wrote

Line breaks, XML data, all the hidden junk. This is one great LPT!

If you're on a Mac, Command+Space Bar to get a spotlight search, then paste/copy is even faster (in my opinion)

2

SaskiavdM t1_j56xyoq wrote

Sublime Text

Select all and: Ctrl Shift J (join lines). Just know there is such a thing as multi-select and multi edit .. it saved me so much time over the years.

1

tinywoodenpig t1_j57trul wrote

thank you so much. i always copy paste homework instructions into a word document and it takes so long to fix the line breaks!! also happy cake day

1

caydayday t1_j58mkxp wrote

You can ask GPT to get rid of those too.

1

hassan789_ t1_j58vhaq wrote

Really good tip... Very poor explanation and description. Either way, thanks

1

TheMcGirlGal t1_j596buw wrote

I just rewrote everything when I wanted to do that with D&D stuff...

Fuck me.

1

ReformedWiggles t1_j59gljo wrote

It also gets rid of fonts, background color etc. I always do this, always have.

2