• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Copy code to TextPad - no linefeeds??

 
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Copy it into Word, then copy it from Word.
 
Eddie Vanda
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Michael, fantastic - btw I also tried wordpad, but that ignored the tabs.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 283
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You ought to ventilate your mind and let the cobwebs out of it. Use this cup to catch the tiny ads:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic