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

24019RE: [Clip] Line Termination Conversion: Simple Trick

Expand Messages
  • John Shotsky
    Sep 5, 2013

      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


      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]


    • Show all 5 messages in this topic