nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] the mechanics of wrapping


From: James Freer
Subject: Re: [Nano-devel] the mechanics of wrapping
Date: Mon, 2 Jun 2014 07:42:49 +0100

On 27/05/2014, Benno Schulenberg <address@hidden> wrote:
>
> On Tue, May 27, 2014, at 19:46, Mark Majeres wrote:
>> I'm a little confused, isn't the nowrap setting independent of justify, ^J
>> ?
>
> Ah.  Only now I notice that Justify will work even when nowrap is set,
> acting as if --fill=-8 were given.  Which is cool, it would be silly if
> it did nothing then.
>
>> When I was using nano with nowrap unset, nothing special happened
>> unless I reduced the width of the terminal to be smaller than a line
>> of text.  But even then, nothing happened until I started typing on
>> the line.  Then the line would wrap, and only that line.  A permanent
>> hard break was added that became part of the document.  The location
>> of the break was determined by the width of the terminal.
>
> The default wrapping width is COLS-8: the width of the terminal minus 8.
> But you can set it to anything you like: --fill=4, --fill=12, or... -r42.
> Such a setting will not break existing lines, unless you add something to
> them.
>
> The thing is: when writing an email, you normally start with nothing.
> And then you start typing, sentence after sentence after sentence, and
> in the meantime you will reach the right edge of the screen several
> times, and then you don't want the line to scroll horizontally, seeing
> the $ on the left and just a few of the last letters you typed (softwrap
> didn't exist yet, it came much later); no, you want nano to automatically
> insert a newline, go back to the beginning of the next line, and continue
> from there, and have the whole preceding text in view.  That's why the
> default is 'unset nowrap' and to have the cursor break to the next line
> when it passes COLS-8.
>
> Benno

I'd be grateful if someone could clarify if nano can be set up for
what I call 'softwrap' for long lines. In gedit wordwrap is exactly
that and the same with emacs 'visual line mode' or Vim's set
linebreak.

There is softwrap in nano but it wraps long lines without removing
spaces and not saving in that mode. I wondered if it had been done in
the new release v2.3.3 but I am not able to do the compiling for a
tarball unless someone is able to guide me through.

thanks
james



reply via email to

[Prev in Thread] Current Thread [Next in Thread]