Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How does copy from code samples work?

 
Rob Ross
Bartender
Posts: 2205
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whenever I copy some code examples from a post, and paste it into my IDE (or text editor), there doesn't appear to be any linefeed characters...everything prints on one line.
Why is this?
Thanks!
Rob
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problems vary with the editor, I'm sure. Whenever I paste in text from a post I get a bunch o' tabs after the first line. Very annoying, since the reason I do it in the first place is to make the code more readable.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Back in the good old days, my preferred solution was to hit "edit" on the post I wanted to copy from - if you cut & paste from the edit screen, linefeeds are preserved, while cut & paste from the regular view does not. The key is, you could go to the edit screen even if you had no intent or authorization to edit a given post, since the system didn't require a password until you pressed "submit". You could also use this to discover what UBB and HTML codes had been used in someone else's post - very useful for learning. Now with the upgrade though, you can no longer get to the edit screen unless you are authorized to actually perform an edit. Which means it must be your own post, or you must be a sheriff or a bartender acting in your own form. Which ofcourse makes this trick of limited use to most people.
However, I just tried using Opera instead of IE, and found that I can cut and paste just fine there, with linefeeds preserved. So it may be worthwhile switching over - or at least, have Opera available on your system, and try it occasionally. Go to www.opera.com (duh) to download it. Enjoy.
[ January 10, 2002: Message edited by: Jim Yingst ]
 
Paul Stevens
Ranch Hand
Posts: 2823
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WordPad preserve the linefeeds. You could paste it there then cut and paste to whereever from there. It is an Editor/IDE thing (JCreator/WordPad preserves Programmers File Editor/NotePad does not).
 
Rob Ross
Bartender
Posts: 2205
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Arrrg, this is driving me BONKERS!
Even when I try to copy code text from a post, so I can quote it in another post, and I paste it directly into the "Post A Reply" form's text field, it still prints all the lines in one row and I have to manually enter a return for each line.
This is the 21st century for god's sake, don't we have technology for these "complicated" editing problems?!?
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jim Yingst:
Back in the good old days, my preferred solution was to hit "edit" on the post I wanted to copy from - if you cut & paste from the edit screen, linefeeds are preserved, while cut & paste from the regular view does not. The key is, you could go to the edit screen even if you had no intent or authorization to edit a given post, since the system didn't require a password until you pressed "submit". You could also use this to discover what UBB and HTML codes had been used in someone else's post - very useful for learning. Now with the upgrade though, you can no longer get to the edit screen unless you are authorized to actually perform an edit. Which means it must be your own post, or you must be a sheriff or a bartender acting in your own form. Which ofcourse makes this trick of limited use to most people.

You can hit "Reply with Quote" button for this proposal. The text will be enclosed in QUOTE tags, but all inner formatting is preserved.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, good point. I never bothered with "Reply with quote" since I prefer to interleaven my responses within the text I'm quoting, and
tags don't really allow this. But clearly the button has other uses I hadn't considered.
[ January 10, 2002: Message edited by: Jim Yingst ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic