Loading ...
Sorry, an error occurred while loading the content.

RE: [Clip] Line Termination Conversion: Simple Trick

Expand Messages
  • John Shotsky
    My version of fixing line terminators is to replace R with r n. That is all it takes. You can do it in a clip or the F/R box in regex form. R collects all
    Message 1 of 5 , Sep 5, 2013
    • 0 Attachment

      My version of fixing line terminators is to replace \R with \r\n. That is all it takes. You can do it in a clip or the F/R box in regex form. \R collects all forms of CRLF combinations by itself.

      To make sure there is a CR on the end of the file, replce \Z with \r\n

       

      Regards,
      John
      RecipeTools Web Site: http://recipetools.gotdns.com/
      John's Mags Yahoo Group:  http://groups.yahoo.com/group/johnsmags/

       

      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Art Kocsis
      Sent: Wednesday, September 04, 2013 21:58
      To: NoteTab-Clips
      Subject: [Clip] Line Termination Conversion: Simple Trick

       

       

      At 9/4/2013 12:51 PM, John wrote:

      >It is a simple command to restore the standard Windows line end formatting in NoteTab. Not so easy in other tools. I get files from all kinds of systems, and the very first thing my clip library does is establish Windows-style line ends, and a CRLF at the end of the file.

      Yes, and line termination is one of the very first things to cause consternation when working with clips in Notetab. Although there is a NTB function that is supposed to convert to Windows format I wouldn't trust it, it is a function rather than a command and it is impossible to find unless you know exactly where to look or just happen to stumble across it. ^$StrFixLines gives no clue as to its purpose by its name alone.

      Short of that function or RegEx I tore my hair out 10 years ago trying to convert single CRs or LFs to CRLF pairs. [Note to self: post an analysis of some of the more Machiavellian behaviors of NTB with line terminators.]

      Although, like many of us, I have a clip to convert docs I recently discovered a very simple, easy and reliable way to convert the document in focus: Simply toggle the word wrap state of the open document twice!

      For convenience, enable* the Toggle Word Wrap icon/function in your toolbar and then just click it twice. Done!

      * [Right click toolbar, check "Toggle Word Wrap", move to desired position, click OK]

      Art

    • Axel Berger
      ... Actually I never had that problem. While the document is open in NT a line end is a line end however it was coded in the file and I can see it and see when
      Message 2 of 5 , Sep 5, 2013
      • 0 Attachment
        Art Kocsis wrote:
        > Yes, and line termination is one of the very first things to
        > cause consternation when working with clips in Notetab.

        Actually I never had that problem. While the document is open in NT a
        line end is a line end however it was coded in the file and I can see it
        and see when it's wrong. After my first save of any file it's DOS
        convention anyway. The only thing I often notice is that files from some
        sources (TeX packages) get noticably bigger even if I changed nearly
        nothing inside.

        Axel
      • Alex Plantema
        ... Toggling word wrap often inserts blank lines at unexpected places in all versions of Notetab I ve used so far. Alex.
        Message 3 of 5 , Sep 5, 2013
        • 0 Attachment
          Op donderdag 5 september 2013 06:58 schreef Art Kocsis:

          > For convenience, enable* the Toggle Word Wrap icon/function in your
          > toolbar and then just click it twice. Done!

          Toggling word wrap often inserts blank lines at unexpected places in all versions of Notetab I've used so far.

          Alex.
        • Axel Berger
          ... I ve never seen that either, and it s something I do often. Long lines to see the structure and wrapped ones to edit content. Axel
          Message 4 of 5 , Sep 5, 2013
          • 0 Attachment
            Alex Plantema wrote:
            > Toggling word wrap often inserts blank lines at unexpected places

            I've never seen that either, and it's something I do often. Long lines
            to see the structure and wrapped ones to edit content.

            Axel
          Your message has been successfully submitted and would be delivered to recipients shortly.