This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Copy code to TextPad - no linefeeds??

 
Eddie Vanda
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
Here is my beginner's question - how do I copy and paste code segments into my textpad editor so as to retain the formatting?
I see from viewing the source code that each line finishes with a " < b r />" markup (spaces inserted to stop it from affecting this post). These "br"'s do not translate to linefeeds in my copy and paste. There must be a simple answer to this?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Copy it into Word, then copy it from Word.
 
Eddie Vanda
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Michael, fantastic - btw I also tried wordpad, but that ignored the tabs.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alternatively, for copying code examples from these forums, you can click the "reply with quote" link, then copy the code from the text area that appears (and then actually reply or don't reply as you see fit).
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also use TextPad's search and replace tool. As long as you turn on the regular expression feature, it will recognize \n as a newline character.
 
Eddie Vanda
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys,
That's given me a few more ways to try out. Unfortunately the " < b r />" markup tag that I see when I view source on the browser does not seem to carry across on cut and paste, neither to textpad nor to dos edit. At least when I save files from there they don't show up on debug. But now I am happily cutting and pasting through word and getting beautiful looking code. Now if only I could find where word stores the default spacing for tab ............
Ed
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic