Announcement

Collapse
No announcement yet.

Copying code samples preserving indentation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Copying code samples preserving indentation

    I was trying to save the homeseer_status_change.txt file UltraJones posted in this thread by copying and pasting, but this seems to loss all the indentation. Anyone know an easy way to preserve it? If not, maybe we should use attachments for anything more than a few lines.

    Nucleus Home Automation
    News, support, and updates for Rover, Network Monitor, TimeIcons, and more

    #2
    paste the text into Wordpad first, then re-select it, and paste where ever you want.

    Skibum

    http://www.skibumsplace.com
    ______________________________
    Skibumsplace - Locate Me

    Comment


      #3
      I tried this, but it seemed to be missing all of its newlines. I finally edited the whole script to insert new line characters and fix the indenting.

      Comment


        #4
        Not sure what you mean by missing all of its new lines, but I tried this again, and it works fine here.

        Skibum

        http://www.skibumsplace.com
        ______________________________
        Skibumsplace - Locate Me

        Comment


          #5
          I didn't lose the newlines, but it didn't preserve the indentation, either. The source shows <BR>s without newlines, but it does have the spaces in it, so I could copy it from there and then replace <BR> with newline, but I'm not sure that's easier.

          UltraJones, could you just attach that file to that particular post, while we try to figure this out?

          Nucleus Home Automation
          News, support, and updates for Rover, Network Monitor, TimeIcons, and more

          Comment


            #6
            I use TextPad as my text editor. I find the same thing Bill Walton said if I paste directly into TextPad, It comes in all on one line. I tried WordPad and saw the same thing Hunter said, newlines preserved but no indentation. If I paste to Word 2000 then reselect and paste into TextPad all is preservered.

            I agree with Hunter, if it's anything more than a few lines it would be easier to grab it as an attachement.


            Paul

            Comment


              #7
              I case you still have problems copying and pasting, here's the file.


              Paul
              Attached Files

              Comment


                #8
                Otherwise I'd've gone straight to the "maybe we should use attachments for multiline stuff" statement in the first place. [img]/infopop/emoticons/icon_smile.gif[/img]

                Nucleus Home Automation
                News, support, and updates for Rover, Network Monitor, TimeIcons, and more

                Comment


                  #9
                  <BLOCKQUOTE><font size="-1">quote:</font><HR>Originally posted by Hunter Green:

                  UltraJones, could you just attach that file to that particular post, while we try to figure this out?

                  http://nucleus.webhop.net/
                  <HR></BLOCKQUOTE>

                  Sorry, but I can't. This message board won't let me add an attachment to an existing posting.

                  Regards,
                  Ultrajones
                  Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                  Comment

                  Working...
                  X