RE: [Clip] Line Termination Conversion: Simple Trick
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
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 Kocsis wrote:
> Yes, and line termination is one of the very first things toActually I never had that problem. While the document is open in NT a
> cause consternation when working with clips in Notetab.
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
- Op donderdag 5 september 2013 06:58 schreef Art Kocsis:
> For convenience, enable* the Toggle Word Wrap icon/function in yourToggling word wrap often inserts blank lines at unexpected places in all versions of Notetab I've used so far.
> toolbar and then just click it twice. Done!
- Alex Plantema wrote:
> Toggling word wrap often inserts blank lines at unexpected placesI've never seen that either, and it's something I do often. Long lines
to see the structure and wrapped ones to edit content.