nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] the mechanics of wrapping


From: Benno Schulenberg
Subject: [Nano-devel] the mechanics of wrapping
Date: Tue, 27 May 2014 20:38:41 +0200

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

-- 
http://www.fastmail.fm - The professional email service




reply via email to

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